diff --git a/uppsrc/CtrlCore/Ctrl.cpp b/uppsrc/CtrlCore/Ctrl.cpp index 57651429c..639c2a8a7 100644 --- a/uppsrc/CtrlCore/Ctrl.cpp +++ b/uppsrc/CtrlCore/Ctrl.cpp @@ -851,7 +851,7 @@ bool Ctrl::IsUHDEnabled() return ApplicationUHDEnabled; } -bool ApplicationDarkThemeEnabled; +bool ApplicationDarkThemeEnabled = true; void Ctrl::SetDarkThemeEnabled(bool set) { diff --git a/uppsrc/CtrlCore/ToDo.txt b/uppsrc/CtrlCore/ToDo.txt index ae6b18249..50a0c18e1 100644 --- a/uppsrc/CtrlCore/ToDo.txt +++ b/uppsrc/CtrlCore/ToDo.txt @@ -1,9 +1,7 @@ - TestChStyle problem with EditDate drop (needs one more click) - Vertical centering of DropList text is a bit off -- Classic is broken - Inactive doc icon is not updated - [B] does not blink anymore - Make allocator work -- ClassicCtrlsImg - FileChooser - Win32 - always use dark mode, always use UHD @@ -17,6 +15,11 @@ DONE: - Some problem when switching skin should be solved - Win32 menu checkbox +- Classic is broken +- ClassicCtrlsImg + +macos done: + - Slider in dark mode is transparent - spin buttons slight visual problem in dark mode - <-|-> cursor looks bad in dark mode @@ -25,7 +28,6 @@ DONE: - Remove menu slide effect - U++ menu has some issues - gtk3 DONE: - Resizing delay diff --git a/uppsrc/CtrlCore/src.tpp/Ctrl_en-us.tpp b/uppsrc/CtrlCore/src.tpp/Ctrl_en-us.tpp index 2a124d721..27501f88c 100644 --- a/uppsrc/CtrlCore/src.tpp/Ctrl_en-us.tpp +++ b/uppsrc/CtrlCore/src.tpp/Ctrl_en-us.tpp @@ -2601,7 +2601,8 @@ ize]_[*@3 sz])&] [s5;:Upp`:`:Ctrl`:`:SetUHDEnabled`(bool`):%- [@(0.0.255) void]_[* SetUHDEnabled]([@(0.0.255) b ool]_[*@3 set])&] [s2; Informs host platform that application is UHD ready. Default -is true.&] +is true. Disabling UHD mode has to be done before GUI`_APP`_MAIN, +e.g. in INITBLOCK.&] [s3; &] [s4;%- &] [s5;:Upp`:`:Ctrl`:`:IsUHDEnabled`(`):%- [@(0.0.255) bool]_[* IsUHDEnabled]()&] @@ -2614,7 +2615,8 @@ is true.&] [s2; Hints coloring and skinning algorithms that the application is ready to work in dark theme mode. Currently this enables dark theme in Windows (with other platforms dark theme is enabled -by default).&] +by default). Default value is true. Disabling dark theme has +to be done before GUI`_APP`_MAIN, e.g. in INITBLOCK.&] [s3; &] [s4;%- &] [s5;:Upp`:`:Ctrl`:`:IsDarkThemeEnabled`(`):%- [@(0.0.255) static] [@(0.0.255) bool]_[* IsDa diff --git a/uppsrc/CtrlLib/Ch.cpp b/uppsrc/CtrlLib/Ch.cpp index f661fd994..9b30f5da0 100644 --- a/uppsrc/CtrlLib/Ch.cpp +++ b/uppsrc/CtrlLib/Ch.cpp @@ -133,8 +133,29 @@ void ChClassicSkin() } int c = DPI(14); + for(int i = 0; i < 4; i++) { - SyntheticTab(i, 0, Gray()); + { + TabCtrl::Style& s = TabCtrl::StyleDefault().Write(); + s.body = MakeClassicButton(White(), Black(), wg, Gray(), SColorFace()); + Color f = i == CTRL_PRESSED ? SColorFace : grayface; + Image t = MakeClassicButton(White(), Black(), wg, Gray(), f); + Size isz = t.GetSize(); + isz.cy -= 2; + ImageDraw iw(isz); + iw.DrawImage(0, 0, t); + if(i == CTRL_PRESSED) { // the active tab + iw.DrawRect(isz.cx - 1, isz.cy - 2, 2, 1, White()); + iw.DrawRect(isz.cx - 2, isz.cy - 1, 2, 1, wg); + } + t = iw; + SetHotSpots(t, Point(2, 2)); + s.first[i] = s.last[i] = s.both[i] = s.normal[i] = t; + s.margin = 0; + s.sel = Rect(0, DPI(1), 0, DPI(1)); + s.extendleft = DPI(2); + s.text_color[i] = SColorText(); + } static int adj[] = { 10, 80, -5, -10 }; Color f = FaceColor(adj[i]); { diff --git a/uppsrc/CtrlLib/TabCtrl.cpp b/uppsrc/CtrlLib/TabCtrl.cpp index 764c583a5..c973b6d43 100644 --- a/uppsrc/CtrlLib/TabCtrl.cpp +++ b/uppsrc/CtrlLib/TabCtrl.cpp @@ -1,4 +1,5 @@ #include "CtrlLib.h" +#include "CtrlLib.h" namespace Upp { @@ -579,9 +580,9 @@ TabCtrl::TabCtrl() Ctrl::Add(tabs); Ctrl::Add(pane); tabs.BackPaint().IgnoreMouse(); - Ctrl::Add(left.SetImage(CtrlsImg::SLA()).ScrollStyle().NoWantFocus()); + Ctrl::Add(left.SetMonoImage(CtrlsImg::SLA()).ScrollStyle().NoWantFocus()); left <<= THISBACK(Left); - Ctrl::Add(right.SetImage(CtrlsImg::SRA()).ScrollStyle().NoWantFocus()); + Ctrl::Add(right.SetMonoImage(CtrlsImg::SRA()).ScrollStyle().NoWantFocus()); right <<= THISBACK(Right); Transparent().NoWantFocus(); tabs.Transparent().NoWantFocus();