CtrlLib: ChGtk scrollbar patch for UHD

git-svn-id: svn://ultimatepp.org/upp/trunk@12563 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-11-21 17:09:58 +00:00
parent e6524c11ca
commit fa5baacf01
4 changed files with 8 additions and 2 deletions

View file

@ -975,6 +975,7 @@ void Ctrl::ReSkin()
if(lock)
return;
lock++;
ChReset();
if(s_chdefault)
(*s_chdefault)();
if(skin)

View file

@ -270,6 +270,11 @@ void ChHostSkin()
s.thumbmin = GTK_RANGE(vscrollbar)->min_slider_size;
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
if(1.6 * s.barsize < GetStdFontCy()) { // GTK2 handles UHD not well, fix the biggest problem
s.barsize += s.barsize;
s.arrowsize += s.arrowsize;
}
/* The only theme with 3 buttons is Amaranth and it does not look good...
s.isright2 = s.isdown2 = GtkInt("has-secondary-forward-stepper");

View file

@ -37,7 +37,7 @@ CH_STYLE(ScrollBar, Style, StyleDefault)
}
ScrollBar::ScrollBar() {
minthumb = 16;
minthumb = DPI(16);
pagepos = pagesize = totalsize = 0;
linesize = 1;
autohide = false;

View file

@ -63,7 +63,7 @@ private:
void Position();
void Uset(int a);
int ScrollBarSize() const { return style->barsize; }
int ScrollBarSize() const { return style->barsize; }
public:
Event<> WhenScroll;