1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Fix padding switcher boxes to match columns

This commit is contained in:
QC 2015-03-21 19:23:13 +01:00
parent d290285a9f
commit b36452cc40
2 changed files with 4 additions and 2 deletions

View file

@ -10,6 +10,7 @@
- Fix font vertical centering. - Fix font vertical centering.
- One-off when pasting text. - One-off when pasting text.
- Improve rendering of boxes (fixed height and margins) - Improve rendering of boxes (fixed height and margins)
- Fix modi switcher boxes size+layout.
Cleanup: Cleanup:
- Do not lug argc,argv around everywhere. - Do not lug argc,argv around everywhere.

View file

@ -1059,10 +1059,11 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
calculate_window_position ( &state, &mon ); calculate_window_position ( &state, &mon );
if ( config.sidebar_mode == TRUE ) { if ( config.sidebar_mode == TRUE ) {
int width = ( state.w - ( 2 * ( config.padding ) ) ) / num_switchers; int width = ( state.w - ( 2 * ( config.padding ) + ( num_switchers - 1 ) * LINE_MARGIN ) ) / num_switchers;
for ( unsigned int j = 0; j < num_switchers; j++ ) { for ( unsigned int j = 0; j < num_switchers; j++ ) {
switchers[j].tb = textbox_create ( main_window, &vinfo, map, TB_CENTER, switchers[j].tb = textbox_create ( main_window, &vinfo, map, TB_CENTER,
config.padding + j * width, state.h - state.line_height - config.padding, config.padding + j * ( width + LINE_MARGIN ),
state.h - state.line_height - config.padding,
width, state.line_height, ( j == curr_switcher ) ? HIGHLIGHT : NORMAL, switchers[j].name ); width, state.line_height, ( j == curr_switcher ) ? HIGHLIGHT : NORMAL, switchers[j].name );
textbox_show ( switchers[j].tb ); textbox_show ( switchers[j].tb );
} }