mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
CtrlCore: GTK fixed KeyDesc for non-alnum characters
git-svn-id: svn://ultimatepp.org/upp/trunk@6607 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a128655ac
commit
7fe1059013
2 changed files with 16 additions and 26 deletions
|
|
@ -30,7 +30,22 @@ bool Ctrl::GuiPlatformSetFullRefreshSpecial()
|
|||
|
||||
String GuiPlatformGetKeyDesc(dword key)
|
||||
{
|
||||
return Null;
|
||||
static Tuple2<dword, const char *> nkey[] = {
|
||||
{ K_DELTA|GDK_KEY_grave, "[`]" },
|
||||
{ K_DELTA|GDK_KEY_minus, "[-]" },
|
||||
{ K_DELTA|GDK_KEY_equal, "[=]" },
|
||||
{ K_DELTA|GDK_KEY_backslash, "[\\]" },
|
||||
{ K_DELTA|GDK_KEY_bracketleft, "[[]" },
|
||||
{ K_DELTA|GDK_KEY_bracketright, "[]]" },
|
||||
{ K_DELTA|GDK_KEY_semicolon, "[;]" },
|
||||
{ K_DELTA|GDK_KEY_apostrophe, "[']" },
|
||||
{ K_DELTA|GDK_KEY_comma, "[,]" },
|
||||
{ K_DELTA|GDK_KEY_period, "[.]" },
|
||||
{ K_DELTA|GDK_KEY_underscore, "[/]" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const Tuple2<dword, const char *> *x = FindTuple(nkey, __countof(nkey), key);
|
||||
return x ? String(x->b) : String();
|
||||
}
|
||||
|
||||
void GuiPlatformAdjustDragImage(ImageBuffer&)
|
||||
|
|
|
|||
|
|
@ -44,31 +44,6 @@ void FontSysData::Init(Font font, int angle)
|
|||
cairo_font_options_t *opt = cairo_font_options_create();
|
||||
scaled_font = cairo_scaled_font_create(font_face, font_matrix, ctm, opt);
|
||||
|
||||
#if 0
|
||||
int synth = 0;
|
||||
FT_Face ft = cairo_ft_scaled_font_lock_face(scaled_font);
|
||||
if(ft) {
|
||||
// if(font.IsBold() && !(ft->style_flags & FT_STYLE_FLAG_BOLD))
|
||||
// synth |= CAIRO_FT_SYNTHESIZE_BOLD;
|
||||
if() {
|
||||
FT_Matrix transform;
|
||||
transform.xx = 0x10000L;
|
||||
transform.yx = 0x00000L;
|
||||
|
||||
transform.xy = 0x03000L;
|
||||
transform.yy = 0x10000L;
|
||||
|
||||
FT_Outline_Transform( outline, &transform );
|
||||
}
|
||||
// synth |= CAIRO_FT_SYNTHESIZE_OBLIQUE;
|
||||
cairo_ft_scaled_font_unlock_face(scaled_font);
|
||||
}
|
||||
// if(synth) {
|
||||
// cairo_ft_font_face_set_synthesize(font_face, synth);
|
||||
// cairo_scaled_font_destroy(scaled_font);
|
||||
// scaled_font = cairo_scaled_font_create(font_face, font_matrix, ctm, opt);
|
||||
// }
|
||||
#endif
|
||||
cairo_font_options_destroy(opt);
|
||||
cairo_font_face_destroy(font_face);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue