mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Fix cursor height.
This commit is contained in:
parent
0e12051783
commit
09130a6d11
1 changed files with 3 additions and 3 deletions
|
@ -239,11 +239,11 @@ void textbox_draw ( textbox *tb )
|
|||
char *text = tb->text ? tb->text : "";
|
||||
int text_len = strlen ( text );
|
||||
int length = text_len;
|
||||
int line_height = textbox_get_font_height ( tb );
|
||||
int font_height = textbox_get_font_height ( tb );
|
||||
int line_width = 0;
|
||||
|
||||
int cursor_x = 0;
|
||||
int cursor_width = MAX ( 2, line_height / 10 );
|
||||
int cursor_width = MAX ( 2, font_height / 10 );
|
||||
|
||||
pango_layout_set_text ( tb->layout, tb->text, strlen ( tb->text ) );
|
||||
|
||||
|
@ -273,7 +273,7 @@ void textbox_draw ( textbox *tb )
|
|||
|
||||
// draw the cursor
|
||||
if ( tb->flags & TB_EDITABLE ) {
|
||||
XftDrawRect ( draw, &tb->color_fg, cursor_x + SIDE_MARGIN, 2, cursor_width, line_height - 4 );
|
||||
XftDrawRect ( draw, &tb->color_fg, cursor_x + SIDE_MARGIN, SIDE_MARGIN, cursor_width, font_height );
|
||||
}
|
||||
|
||||
XftDrawRect ( draw, &tb->color_bg, tb->w, 0, 0, tb->h );
|
||||
|
|
Loading…
Reference in a new issue