Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
squeekboard
Commits
74550d24
Commit
74550d24
authored
Sep 30, 2011
by
Daiki Ueno
Browse files
Fix label alignment when the text is RTL.
parent
148d8e75
Changes
1
Show whitespace changes
Inline
Side-by-side
eek/eek-renderer.c
View file @
74550d24
...
...
@@ -608,6 +608,7 @@ eek_renderer_real_render_key_label (EekRenderer *self,
EekBounds
bounds
;
const
TextProperty
*
prop
;
PangoFontDescription
*
font
;
PangoLayoutLine
*
line
;
gdouble
scale
;
symbol
=
eek_key_get_symbol_with_fallback
(
key
,
0
,
0
);
...
...
@@ -654,6 +655,9 @@ eek_renderer_real_render_key_label (EekRenderer *self,
pango_font_description_free
(
font
);
pango_layout_set_text
(
layout
,
label
,
-
1
);
line
=
pango_layout_get_line
(
layout
,
0
);
if
(
line
->
resolved_dir
==
PANGO_DIRECTION_RTL
)
pango_layout_set_alignment
(
layout
,
PANGO_ALIGN_RIGHT
);
pango_layout_set_width
(
layout
,
PANGO_SCALE
*
bounds
.
width
*
priv
->
scale
*
scale
);
if
(
prop
->
ellipses
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment