mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore/CtrlLib: Fixed some issues with UHD mode and Gtk skin
git-svn-id: svn://ultimatepp.org/upp/trunk@8825 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
98c1f08cf9
commit
2f6fdfc629
4 changed files with 15 additions and 8 deletions
|
|
@ -955,6 +955,9 @@ void Ctrl::ReSkin()
|
|||
if(lock)
|
||||
return;
|
||||
lock++;
|
||||
bool uhd = GetStdFontCy() > 22;
|
||||
GUI_HiDPI_Write(GetStdFontCy() > 22);
|
||||
SetUHDMode(uhd);
|
||||
if(s_chdefault)
|
||||
(*s_chdefault)();
|
||||
if(skin)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,10 @@ extern String CurrentSoundTheme;
|
|||
|
||||
void ChHostSkin()
|
||||
{
|
||||
int fcx = 17 * (1 + IsUHDMode());
|
||||
FrameButtonWidth_Write(fcx);
|
||||
ScrollBarArrowSize_Write(fcx);
|
||||
|
||||
MemoryIgnoreLeaksBlock __;
|
||||
static struct { void (*set)(Color); int ii; } col[] = {
|
||||
{ SColorPaper_Write, 6*5 + 0 },
|
||||
|
|
@ -81,7 +85,7 @@ void ChHostSkin()
|
|||
ColoredOverride(CtrlsImg::Iml(), ClassicCtrlsImg::Iml());
|
||||
|
||||
ChLookFn(GtkLookFn);
|
||||
|
||||
|
||||
bool KDE = Environment().Get("KDE_FULL_SESSION", String()) == "true";
|
||||
|
||||
String engine = GtkStyleString("gtk-theme-name");
|
||||
|
|
@ -159,7 +163,7 @@ void ChHostSkin()
|
|||
|
||||
ChGtkIs().Clear();
|
||||
GtkWidget *w = Setup(gtk_radio_button_new(NULL));
|
||||
int is = GtkInt(w, "indicator-size") + 2;
|
||||
int is = DPI(GtkInt(w, "indicator-size")) + 2;
|
||||
GTK_TOGGLE_BUTTON(w)->active = false;
|
||||
GTK_TOGGLE_BUTTON(w)->inconsistent = false;
|
||||
GtkIml(CtrlsImg::I_S0, w, 2, "radiobutton", GTK_OPTION|GTK_MARGIN1, is, is);
|
||||
|
|
@ -203,9 +207,9 @@ void ChHostSkin()
|
|||
po.x = GtkInt("child-displacement-x");
|
||||
po.y = GtkInt("child-displacement-y");
|
||||
|
||||
s.ok = GtkImage("gtk-ok", 4, 16);
|
||||
s.cancel = GtkImage("gtk-cancel", 4, 16);
|
||||
s.exit = GtkImage("gtk-quit", 4, 16);
|
||||
s.ok = GtkImage("gtk-ok", DPI(16), DPI(16));
|
||||
s.cancel = GtkImage("gtk-cancel", DPI(16), DPI(16));
|
||||
s.exit = GtkImage("gtk-quit", DPI(16), DPI(16));
|
||||
|
||||
ChGtkColor(s.textcolor, 0 * 5);
|
||||
s.pressoffset = po;
|
||||
|
|
@ -260,7 +264,7 @@ void ChHostSkin()
|
|||
ChGtkNew(vscrollbar, "slider", GTK_SLIDER|GTK_VAL1);
|
||||
|
||||
s.thumbmin = GTK_RANGE(vscrollbar)->min_slider_size;
|
||||
s.barsize = max(14, GtkInt("slider_width")); // 'max' - ugly fix for ThinIce theme
|
||||
s.barsize = max(DPI(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...
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ String GtkStyleString(const char *name);
|
|||
|
||||
void GtkChScrollBar(Value *lbutton, Value *lbutton2,
|
||||
Value *lower, Value *thumb, Value *upper,
|
||||
Value *ubutton2, Value *ubutton,
|
||||
Value *ubutton2, Value *ubutton,
|
||||
int i_larrow, int i_uarrow, bool horz);
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _PdfDraw_icpp_init_stub
|
||||
#define _PdfDraw_icpp_init_stub
|
||||
#include "Draw/init"
|
||||
#define BLITZ_INDEX__ F51dd2ec67e7a06d44adca1e7fbbaebdc
|
||||
#define BLITZ_INDEX__ F45b8b8ce27234b3a4db83c8cbd05bbce
|
||||
#include "PdfReport.icpp"
|
||||
#undef BLITZ_INDEX__
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue