mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CtrlLib: Win32 HeaderCtrl appearance changed (now ignoring weird native appearance)
git-svn-id: svn://ultimatepp.org/upp/trunk@15607 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
550e2e7e1a
commit
21a64f02e3
2 changed files with 9 additions and 17 deletions
|
|
@ -38,6 +38,8 @@ Image WithRightLine(const Image& m, Color c, int w = DPI(1));
|
|||
Image WithTopLine(const Image& m, Color c, int w = DPI(1));
|
||||
Image WithBottomLine(const Image& m, Color c, int w = DPI(1));
|
||||
|
||||
Color FaceColor(int adj);
|
||||
|
||||
// Creates synthetic style based on SColors and basic button face
|
||||
void ChSynthetic(Image *button100x100, Color *text, bool macos = false);
|
||||
|
||||
|
|
|
|||
|
|
@ -550,26 +550,16 @@ void ChHostSkin()
|
|||
s.border = s.trivialborder = XpInt(XP_COMBOBOX, CP_DROPDOWNBUTTON, CBXS_NORMAL, 2403/*TMT_BORDERSIZE*/);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
HeaderCtrl::Style& s = HeaderCtrl::StyleDefault().Write();
|
||||
Win32Look(s.look, 4, XP_HEADER, HP_HEADERITEM);
|
||||
Image hm = Unmultiply(XpImage(XP_HEADER, HP_HEADERITEM, 1, SColorPaper, Size(20, 10)));
|
||||
RGBA textc = SColorText();
|
||||
int diff = Diff(hm[4][19], textc);
|
||||
int hdroll = 0;
|
||||
HeaderCtrl::Style& hs = HeaderCtrl::StyleDefault().Write();
|
||||
for(int i = 0; i < 4; i++) {
|
||||
int d = Diff(hm[4][i], textc);
|
||||
if(d < diff) {
|
||||
diff = d;
|
||||
hdroll = i + 1;
|
||||
}
|
||||
d = Diff(hm[4][19 - i], textc);
|
||||
if(d < diff) {
|
||||
diff = d;
|
||||
hdroll = -i;
|
||||
}
|
||||
Image h = CreateImage(Size(10, 10), FaceColor(decode(i, CTRL_NORMAL, 5,
|
||||
CTRL_HOT, IsDarkTheme() ? 10 : 0,
|
||||
CTRL_PRESSED, -5,
|
||||
-8)));
|
||||
hs.look[i] = ChHot(WithBottomLine(WithRightLine(h, SColorShadow(), 1), SColorShadow()));
|
||||
}
|
||||
s.gridadjustment = hdroll;
|
||||
}
|
||||
{
|
||||
ProgressIndicator::Style& s = ProgressIndicator::StyleDefault().Write();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue