mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-03 16:05:20 -05:00
Fix some font stuff.
This commit is contained in:
parent
21144aef17
commit
3df30438b1
3 changed files with 6 additions and 5 deletions
|
@ -7,6 +7,7 @@
|
|||
- Add Ctrl(Shift)Tab to switch modi's.
|
||||
- Auto size number of columns based on available columns.
|
||||
- Better way to determine font height.
|
||||
- Fix font vertical centering.
|
||||
- One-off when pasting text.
|
||||
Cleanup:
|
||||
- Do not lug argc,argv around everywhere.
|
||||
|
|
|
@ -1018,13 +1018,13 @@ MenuReturn menu ( char **lines, unsigned int num_lines, char **input, char *prom
|
|||
textbox_show ( state.boxes[i] );
|
||||
}
|
||||
// Arrows
|
||||
state.arrowbox_top = textbox_create ( main_window, &vinfo, map, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||
state.arrowbox_top = textbox_create ( main_window, &vinfo, map, TB_AUTOWIDTH,
|
||||
( config.padding ), ( config.padding ),
|
||||
0, 0, NORMAL,
|
||||
0, element_height, NORMAL,
|
||||
"↑" );
|
||||
state.arrowbox_bottom = textbox_create ( main_window, &vinfo, map, TB_AUTOHEIGHT | TB_AUTOWIDTH,
|
||||
state.arrowbox_bottom = textbox_create ( main_window, &vinfo, map, TB_AUTOWIDTH,
|
||||
( config.padding ), ( config.padding ),
|
||||
0, 0, NORMAL,
|
||||
0, element_height, NORMAL,
|
||||
"↓" );
|
||||
textbox_move ( state.arrowbox_top,
|
||||
state.w - config.padding - state.arrowbox_top->w,
|
||||
|
|
|
@ -289,7 +289,7 @@ void textbox_draw ( textbox *tb )
|
|||
int tw = textbox_get_font_width ( tb );
|
||||
x = ( PANGO_SCALE * ( tb->w - tw - 2 * SIDE_MARGIN ) ) / 2;
|
||||
}
|
||||
y = ( PANGO_SCALE * ( textbox_get_width ( tb ) - textbox_get_font_width ( tb ) ) ) / 2;
|
||||
y = ( PANGO_SCALE * ( tb->h - textbox_get_height ( tb ) + 2 * SIDE_MARGIN ) ) / 2;
|
||||
// Render the layout.
|
||||
pango_xft_render_layout ( draw, &( tb->color_fg ), tb->layout, x, y );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue