1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-02-24 15:56:25 -05:00

Fix some font stuff.

This commit is contained in:
QC 2015-03-19 23:48:49 +01:00
parent 21144aef17
commit 3df30438b1
3 changed files with 6 additions and 5 deletions

View file

@ -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.

View file

@ -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,

View file

@ -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 );