CtrlLib: Gtk UHD fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@12313 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-09-27 10:26:20 +00:00
parent cbab674203
commit f6305402f9
4 changed files with 5 additions and 6 deletions

View file

@ -268,7 +268,7 @@ void ChHostSkin()
s.thumbwidth = GtkInt(vscrollbar, "slider-width");
s.thumbmin = GTK_RANGE(vscrollbar)->min_slider_size;
s.barsize = max(DPI(14), GtkInt("slider_width")); // 'max' - ugly fix for ThinIce theme
s.barsize = max(14, GtkInt("slider_width")); // 'max' - ugly fix for ThinIce theme
s.arrowsize = max(s.barsize, GtkInt("stepper_size")); // 'max' - ugly fix for ThinIce theme
/* The only theme with 3 buttons is Amaranth and it does not look good...

View file

@ -145,7 +145,7 @@ void GtkChImgWith(Value& look, int shadow, int state, const Image& img, Color c,
void GtkChImgWith(Value *look, const Image& img, int kind, Point offset = Point(0, 0));
bool IsEmptyImage(const Image& m);
Image GtkThemeIcon(const char *name, bool large);
Image GtkThemeIcon(const char *name, int sz);
int GtkStyleInt(const char *name);
String GtkStyleString(const char *name);

View file

@ -556,9 +556,8 @@ bool IsEmptyImage(const Image& m)
return true;
}
Image GtkThemeIcon(const char *name, bool large)
Image GtkThemeIcon(const char *name, int rsz)
{
int rsz = large ? 48 : 16;
Image m = GetGTK(gtk__parent(), rsz, 0, name, GTK_THEMEICON, 0, 0);
Size sz = m.GetSize();
if(sz.cx > rsz || sz.cy > rsz)

View file

@ -83,11 +83,11 @@ Image GetFileIcon(const char *path, bool dir, bool force, bool large, bool quick
#if defined(PLATFORM_X11) && !defined(flagNOGTK)
Image GtkThemeIcon(const char *name, bool large);
Image GtkThemeIcon(const char *name, int sz);
Image GnomeImage(const char *s, bool large = false)
{
return GtkThemeIcon(String("gnome-") + s, large);
return GtkThemeIcon(String("gnome-") + s, DPI(large ? 48 : 16));
}
Image SystemImage(const char *s, bool large = false)