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:
parent
d290285a9f
commit
b36452cc40
2 changed files with 4 additions and 2 deletions
|
@ -10,6 +10,7 @@
|
|||
- Fix font vertical centering.
|
||||
- One-off when pasting text.
|
||||
- Improve rendering of boxes (fixed height and margins)
|
||||
- Fix modi switcher boxes size+layout.
|
||||
Cleanup:
|
||||
- Do not lug argc,argv around everywhere.
|
||||
|
||||
|
|
|
@ -1059,10 +1059,11 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
|||
calculate_window_position ( &state, &mon );
|
||||
|
||||
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++ ) {
|
||||
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 );
|
||||
textbox_show ( switchers[j].tb );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue