mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Dynamic skin changes
This commit is contained in:
parent
bb6df1b858
commit
c3ce92830d
68 changed files with 930 additions and 949 deletions
|
|
@ -1,4 +1,4 @@
|
|||
description "Paints text using different colors";
|
||||
description "Paints text using different colors\377";
|
||||
|
||||
uses
|
||||
CtrlLib;
|
||||
|
|
|
|||
|
|
@ -281,6 +281,8 @@ GUI_APP_MAIN
|
|||
SetLanguage(LNG_ENGLISH);
|
||||
SetDefaultCharset(CHARSET_UTF8);
|
||||
|
||||
Ctrl::SkinChangeSensitive();
|
||||
|
||||
UWordFs().Type("QTF files", "*.qtf")
|
||||
.Type("RTF files", "*.rtf")
|
||||
.AllFilesType()
|
||||
|
|
|
|||
16
reference/ThemeChangeSensitive/MyApp.h
Normal file
16
reference/ThemeChangeSensitive/MyApp.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef _SkinSensitive_SkinSensitive_h
|
||||
#define _SkinSensitive_SkinSensitive_h
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <SkinSensitive/SkinSensitive.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
class SkinSensitive : public WithSkinSensitiveLayout<TopWindow> {
|
||||
public:
|
||||
SkinSensitive();
|
||||
};
|
||||
|
||||
#endif
|
||||
18
reference/ThemeChangeSensitive/MyApp.lay
Normal file
18
reference/ThemeChangeSensitive/MyApp.lay
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
LAYOUT(MyAppLayout, 644, 348)
|
||||
ITEM(Upp::ArrayCtrl, list1, LeftPosZ(4, 156).TopPosZ(4, 148))
|
||||
ITEM(Upp::ArrayCtrl, list2, LeftPosZ(164, 156).TopPosZ(4, 148))
|
||||
ITEM(Upp::ArrayCtrl, list3, LeftPosZ(324, 156).TopPosZ(4, 148))
|
||||
ITEM(Upp::ArrayCtrl, list4, LeftPosZ(484, 156).TopPosZ(4, 148))
|
||||
ITEM(Upp::Button, std, SetLabel(t_("Set Standard skin")).LeftPosZ(4, 112).TopPosZ(284, 24))
|
||||
ITEM(Upp::Button, dark, SetLabel(t_("Set Standard dark skin")).LeftPosZ(120, 140).TopPosZ(284, 24))
|
||||
ITEM(Upp::Button, host, SetLabel(t_("Set Host platform skin")).LeftPosZ(264, 140).TopPosZ(284, 24))
|
||||
ITEM(Upp::Button, toggle, SetLabel(t_("Toggle dark")).LeftPosZ(4, 104).TopPosZ(316, 24))
|
||||
ITEM(Upp::Label, info, SetLabel(t_("In debug mode, the prefined key for Toggle dark is Ctrl+Num[*]")).LeftPosZ(112, 328).TopPosZ(316, 24))
|
||||
ITEM(Upp::ImageCtrl, img1, LeftPosZ(4, 60).TopPosZ(156, 36))
|
||||
ITEM(Upp::ImageCtrl, img2, LeftPosZ(4, 60).TopPosZ(196, 36))
|
||||
ITEM(Upp::ImageCtrl, img3, LeftPosZ(4, 60).TopPosZ(236, 36))
|
||||
ITEM(Upp::Label, dv___12, SetLabel(t_("This image is sourced as iml constant and automatically adjusts to theme changes")).LeftPosZ(68, 452).TopPosZ(156, 36))
|
||||
ITEM(Upp::Label, dv___13, SetLabel(t_("This image is created and does not change when theme changes")).LeftPosZ(68, 452).TopPosZ(196, 36))
|
||||
ITEM(Upp::Label, dv___14, SetLabel(t_("This image is created but is changed by Skin method")).LeftPosZ(68, 452).TopPosZ(236, 36))
|
||||
END_LAYOUT
|
||||
|
||||
3
reference/ThemeChangeSensitive/SkinSensitive.lay
Normal file
3
reference/ThemeChangeSensitive/SkinSensitive.lay
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
LAYOUT(MyAppLayout, 200, 100)
|
||||
END_LAYOUT
|
||||
|
||||
11
reference/ThemeChangeSensitive/ThemeChangeSensitive.upp
Normal file
11
reference/ThemeChangeSensitive/ThemeChangeSensitive.upp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
MyApp.h,
|
||||
main.cpp,
|
||||
MyApp.lay;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
91
reference/ThemeChangeSensitive/main.cpp
Normal file
91
reference/ThemeChangeSensitive/main.cpp
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
#ifndef _SkinSensitive_SkinSensitive_h
|
||||
#define _SkinSensitive_SkinSensitive_h
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#define LAYOUTFILE <ThemeChangeSensitive/MyApp.lay>
|
||||
#include <CtrlCore/lay.h>
|
||||
|
||||
struct MyApp : public WithMyAppLayout<TopWindow> {
|
||||
virtual void Skin();
|
||||
|
||||
Image MakeImage();
|
||||
|
||||
MyApp();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Image MyApp::MakeImage()
|
||||
{ // make some image in a way that reflects dark/light mode
|
||||
Size sz = CtrlImg::HandCursor().GetSize();
|
||||
ImageDraw iw(sz.cx, sz.cy);
|
||||
iw.DrawRect(sz, SColorFace());
|
||||
iw.DrawImage(0, 0, CtrlImg::HandCursor()); // HandCursor is adjusted wrt dark/light
|
||||
iw.DrawRect(sz.cx / 2, sz.cy / 2, DPI(5), DPI(5), SColorHighlight()); // SColorHighlight is adjusted wrt dark/light
|
||||
return iw;
|
||||
}
|
||||
|
||||
void MyApp::Skin()
|
||||
{ // called on opening window and on theme change
|
||||
list4.Clear(); // just refill the list with new colors
|
||||
list4.Add(AttrText("Blend(SRed, SYellow)").NormalInk(Blend(SRed(), SYellow())).Bold());
|
||||
list4.Add(AttrText("SLtBlue").NormalInk(SBlue().Resolved()).Bold()); // Resolved converts SBlue to normal color, just as does Blend
|
||||
list4.Add(AttrText("Blend(SRed, SLtBlue)").NormalInk(Blend(SRed(), SLtBlue())).Bold());
|
||||
|
||||
img3.SetImage(MakeImage());
|
||||
}
|
||||
|
||||
MyApp::MyApp()
|
||||
{
|
||||
CtrlLayout(*this, "How to dynamically react to theme changes");
|
||||
list1.AddColumn("Ignoring skin change");
|
||||
list1.NoCursor();
|
||||
list1.Add(AttrText("Blend(Red, Yellow)").NormalInk(Blend(SRed(), SYellow())).Bold());
|
||||
list1.Add(AttrText("SBlue").NormalInk(SBlue().Resolved()).Bold()); // Resolved converts SBlue to normal color, just as does Blend, for testing
|
||||
list1.Add(AttrText("Blend(Red, LtBlue)").NormalInk(Blend(SRed(), SLtBlue())).Bold());
|
||||
|
||||
list2.AddColumn("Using AColor");
|
||||
list2.NoCursor();
|
||||
list2.Add(AttrText("Blend(Red, Yellow)").NormalInk(AColor(Blend(Red(), Yellow()))).Bold()); // Light theme color that gets adjusted if theme is dark
|
||||
list2.Add(AttrText("SLtBlue").NormalInk(AColor(Blue())).Bold());
|
||||
list2.Add(AttrText("Blend(Red, LtBlue)").NormalInk(AColor(Blend(Red(), LtBlue()))).Bold());
|
||||
|
||||
list3.AddColumn("Using SColor");
|
||||
list3.NoCursor();
|
||||
static SColor ry([] { return Blend(SRed(), SYellow()); }); // Gets reevaluated on skin change
|
||||
static SColor rb([] { return Blend(SRed(), SLtBlue()); });
|
||||
list3.Add(AttrText("Blend(Red, Yellow)").NormalInk(ry).Bold());
|
||||
list3.Add(AttrText("SLtBlue").NormalInk(SBlue()).Bold()); // SBlue is different based on skin
|
||||
list3.Add(AttrText("Blend(Red, LtBlue)").NormalInk(rb).Bold());
|
||||
|
||||
list4.AddColumn("Reloaded with Skin");
|
||||
list4.NoCursor();
|
||||
|
||||
img1.SetImage(CtrlImg::HandCursor()); // iml image constants react to theme changes (even theirs copies)
|
||||
img2.SetImage(MakeImage()); // the image copy is stored just once and does not reflect theme changes
|
||||
|
||||
std << [=] { Ctrl::SetSkin(ChStdSkin); };
|
||||
dark << [=] { Ctrl::SetSkin(ChDarkSkin); };
|
||||
host << [=] { Ctrl::SetSkin(ChHostSkin); };
|
||||
|
||||
toggle << [=] { Ctrl::SwapDarkLight(); };
|
||||
|
||||
#ifndef _DEBUG
|
||||
info = "Predefined key for Toggle dark was set to Space";
|
||||
#endif
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
#ifndef _DEBUG
|
||||
Ctrl::SwapDarkLightKey(K_SPACE); // just to demonstrate that toggle key can be activated in Release mode too and/or different
|
||||
#endif
|
||||
|
||||
Ctrl::SkinChangeSensitive(); // activate changes of skin (theme) when host theme changes
|
||||
MyApp().Run();
|
||||
}
|
||||
|
|
@ -196,6 +196,7 @@ void HighlightSetup::DarkTheme(bool host)
|
|||
SetHlStyle(PAPER_WARNING, Color(21, 21, 0));
|
||||
SetHlStyle(SHOW_LINE, Color(27, 75, 26));
|
||||
SetHlStyle(SHOW_COLUMN, Color(56, 33, 29));
|
||||
SetHlStyle(SHOW_BORDER, Color(70, 50, 50));
|
||||
SetHlStyle(WHITESPACE, Color(68, 128, 176));
|
||||
SetHlStyle(WARN_WHITESPACE, Color(206, 141, 141));
|
||||
|
||||
|
|
@ -261,6 +262,7 @@ void HighlightSetup::WhiteTheme(bool host)
|
|||
|
||||
SetHlStyle(SHOW_LINE, Color(199, 247, 198));
|
||||
SetHlStyle(SHOW_COLUMN, Color(247, 224, 220));
|
||||
SetHlStyle(SHOW_BORDER, Color(250, 220, 220));
|
||||
|
||||
SetHlStyle(INK_NORMAL, Black());
|
||||
SetHlStyle(INK_DISABLED, Color(109, 109, 109));
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ HL_COLOR(PAPER_ERROR_FILE, t_("Current file errors"), 0)
|
|||
HL_COLOR(PAPER_WARNING, t_("Warning in compiler messages"), 0)
|
||||
HL_COLOR(SHOW_LINE, t_("Current line highlight"), 0)
|
||||
HL_COLOR(SHOW_COLUMN, t_("Current column highlight"), 0)
|
||||
HL_COLOR(SHOW_BORDER, t_("Border column highlight"), 0)
|
||||
|
||||
HL_COLOR(WHITESPACE, t_("Whitespaces"), 1)
|
||||
HL_COLOR(WARN_WHITESPACE, t_("Misplaced tabs and spaces"), 1)
|
||||
|
|
|
|||
|
|
@ -94,11 +94,75 @@ double ContrastRatio(Color c1, Color c2) {
|
|||
return (max(rl1, rl2) + 0.05) / (min(rl1, rl2) + 0.05);
|
||||
}
|
||||
|
||||
static const int s_Max = 1024;
|
||||
static std::atomic<int> s_color_ii;
|
||||
static Color s_color[s_Max];
|
||||
static Color (*s_color_fn[s_Max])();
|
||||
|
||||
SColor::SColor(Color (*fn)())
|
||||
{
|
||||
int ii = s_color_ii++;
|
||||
ASSERT(ii < s_Max); // number of SColors is limited
|
||||
ii = min(ii, s_Max - 1);
|
||||
s_color_fn[ii] = fn;
|
||||
if(fn)
|
||||
s_color[ii] = (*fn)();
|
||||
color = ii | SCOLOR;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
SColor::~SColor()
|
||||
{
|
||||
ASSERT(!IsMainRunning()); // SColor cannot be stack variable
|
||||
}
|
||||
#endif
|
||||
|
||||
void SColor::Refresh()
|
||||
{
|
||||
int n = min((int)s_color_ii, s_Max - 1);
|
||||
for(int i = 0; i < n; i++)
|
||||
if(s_color_fn[i])
|
||||
s_color[i] = (*s_color_fn[i])();
|
||||
}
|
||||
|
||||
void SColor::Write(Color c, Color val)
|
||||
{
|
||||
int ii = c.GetRaw() & VBITS;
|
||||
ASSERT((c.GetRaw() & SCOLOR) && ii >= 0 && ii < s_Max);
|
||||
if(ii >= 0 && ii < s_Max) {
|
||||
ASSERT(!s_color_fn[ii]);
|
||||
s_color[ii] = val.Resolved();
|
||||
}
|
||||
}
|
||||
|
||||
bool AColor_dark_mode__;
|
||||
|
||||
dword Color::Get() const
|
||||
{
|
||||
if(IsNullInstance()) return 0;
|
||||
dword c = color;
|
||||
return c & 0xffffff;
|
||||
if(color & SPECIAL)
|
||||
return 0;
|
||||
dword val = color & VBITS;
|
||||
if(color & ACOLOR) {
|
||||
Color c = FromRaw(val);
|
||||
if(AColor_dark_mode__)
|
||||
return DarkThemeCached(c).color;
|
||||
return val;
|
||||
}
|
||||
if(color & SCOLOR)
|
||||
return val < s_Max ? s_color[val].color : 0;
|
||||
return color & VBITS;
|
||||
}
|
||||
|
||||
String Color::ToString() const {
|
||||
if(IsNull(*this))
|
||||
return "Color(Null)";
|
||||
if(color & SCOLOR)
|
||||
return Format("SColor(%d) -> Color(%d, %d, %d)", int(color & VBITS), GetR(), GetG(), GetB());
|
||||
int ii = GetSpecial();
|
||||
if(ii >= 0)
|
||||
return Format("Color::Special(%d)", ii);
|
||||
return Format("Color(%d, %d, %d)", GetR(), GetG(), GetB());
|
||||
}
|
||||
|
||||
template <>
|
||||
|
|
@ -186,15 +250,6 @@ RGBA operator*(int alpha, Color c)
|
|||
return r;
|
||||
}
|
||||
|
||||
template<>
|
||||
String AsString(const Color& c) {
|
||||
if(IsNull(c))
|
||||
return "Color(Null)";
|
||||
if(c.GetRaw() & 0x80000000)
|
||||
return Format("Color(%d, 0)", int(c.GetRaw() & ~0x80000000));
|
||||
return Format("Color(%d, %d, %d)", c.GetR(), c.GetG(), c.GetB());
|
||||
}
|
||||
|
||||
String ColorToHtml(Color color)
|
||||
{
|
||||
return IsNull(color) ? Null : Format("#%02X%02X%02X", color.GetR(), color.GetG(), color.GetB());
|
||||
|
|
@ -260,8 +315,6 @@ int Grayscale2(const Color& c)
|
|||
return (c.GetR() + c.GetG() + c.GetB()) / 3;
|
||||
}
|
||||
|
||||
#if 1
|
||||
|
||||
double C_R = 0.32;
|
||||
double C_G = 0.5;
|
||||
double C_B = 0.2;
|
||||
|
|
@ -302,91 +355,12 @@ Color DarkTheme(Color color)
|
|||
Saturate255(int(b + saturation)));
|
||||
}
|
||||
|
||||
|
||||
#else // older worse algorithm
|
||||
|
||||
double DarkTheme_c[3] = { 0.3, 0.5, 0.2 };
|
||||
int DarkTheme_middle = 155;
|
||||
|
||||
Color DarkTheme(Color color)
|
||||
{
|
||||
if(IsNull(color))
|
||||
return Null;
|
||||
|
||||
double v[3];
|
||||
v[0] = color.GetR();
|
||||
v[1] = color.GetG();
|
||||
v[2] = color.GetB();
|
||||
|
||||
// this represent physiological perception of brightness of R,G,B. Sum = 1
|
||||
static double *c = DarkTheme_c; // with this set, blues and reds are more pronounced
|
||||
|
||||
double m0 = c[0] * v[0] + c[1] * v[1] + c[2] * v[2]; // base brightness
|
||||
|
||||
const int middle = DarkTheme_middle; // this value represents gamma-like feature, imbalance of perception of dark vs bright
|
||||
const double up = (256.0 - middle) / middle;
|
||||
const double down = 1 / up;
|
||||
|
||||
double m; // target brightness
|
||||
if(m0 < middle)
|
||||
m = middle + (middle - m0) * up;
|
||||
else
|
||||
m = middle - (m0 - middle) * down;
|
||||
|
||||
int i0 = 0;
|
||||
int i1 = 1;
|
||||
int i2 = 2;
|
||||
|
||||
if(v[i0] > v[i1])
|
||||
Swap(i0, i1);
|
||||
if(v[i1] > v[i2])
|
||||
Swap(i1, i2);
|
||||
if(v[i0] > v[i1])
|
||||
Swap(i0, i1);
|
||||
|
||||
if(m0 < m) {
|
||||
m -= m0;
|
||||
double a = min(v[i2] + m, 255.0) - v[i2];
|
||||
v[i0] += a;
|
||||
v[i1] += a;
|
||||
v[i2] += a;
|
||||
m -= a;
|
||||
|
||||
a = min(v[i1] + m / (c[i0] + c[i1]), 255.0) - v[i1];
|
||||
v[i0] += a;
|
||||
v[i1] += a;
|
||||
m -= (c[i0] + c[i1]) * a;
|
||||
|
||||
v[i0] = min(v[i0] + m / c[i1], 255.0);
|
||||
}
|
||||
else {
|
||||
m = m0 - m;
|
||||
double a = v[i0] - max(v[i0] - m, 0.0);
|
||||
v[i0] -= a;
|
||||
v[i1] -= a;
|
||||
v[i2] -= a;
|
||||
m -= a;
|
||||
|
||||
a = v[i1] - max(v[i1] - m / (c[i1] + c[i2]), 0.0);
|
||||
v[i1] -= a;
|
||||
v[i2] -= a;
|
||||
m -= (c[i1] + c[i2]) * a;
|
||||
|
||||
v[i2] = max(v[i2] - m / c[i2], 0.0);
|
||||
}
|
||||
|
||||
return Color((int)v[0], (int)v[1], (int)v[2]);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Color DarkThemeCached(Color c)
|
||||
{
|
||||
const int N = 8;
|
||||
const int N = 256; // must be 2^N
|
||||
thread_local struct Cache {
|
||||
Color icolor[N];
|
||||
Color ocolor[N];
|
||||
int ii = 0;
|
||||
|
||||
Cache() {
|
||||
for(int i = 0; i < N; i++) {
|
||||
|
|
@ -395,13 +369,12 @@ Color DarkThemeCached(Color c)
|
|||
}
|
||||
}
|
||||
} cache;
|
||||
#define DO(i) if(cache.icolor[i] == c) return cache.ocolor[i];
|
||||
DO(0); DO(1); DO(2); DO(3); DO(4); DO(5); DO(6); DO(7);
|
||||
cache.ii = (cache.ii + 1) & (N - 1);
|
||||
cache.icolor[cache.ii] = c;
|
||||
c = DarkTheme(c);
|
||||
cache.ocolor[cache.ii] = c;
|
||||
return c;
|
||||
|
||||
int i = FoldHash32(c.GetRaw()) & (N - 1);
|
||||
if(cache.icolor[i] == c)
|
||||
return cache.ocolor[i];
|
||||
cache.icolor[i] = c;
|
||||
return cache.ocolor[i] = DarkTheme(cache.icolor[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,15 @@ class Color : public ValueType<Color, COLOR_V, Moveable<Color> > {
|
|||
protected:
|
||||
dword color;
|
||||
|
||||
enum {
|
||||
SPECIAL = 0x80000000, // special "non-colors"
|
||||
SCOLOR = 0x40000000, // SColor - colors defined by function
|
||||
ACOLOR = 0x20000000, // light colors that get automatically converted in dark mode
|
||||
VBITS = 0xffffff,
|
||||
};
|
||||
|
||||
dword Get() const;
|
||||
void SetSpecial(int n) { color = SPECIAL | n; }
|
||||
|
||||
public:
|
||||
dword GetRaw() const { return color; }
|
||||
|
|
@ -75,10 +83,12 @@ public:
|
|||
|
||||
Color(Color (*fn)()) { color = (*fn)().color; }
|
||||
|
||||
static Color FromRaw(dword co) { Color c; c.color = co; return c; }
|
||||
static Color Special(int n) { Color c; c.color = 0x80000000 | n; return c; }
|
||||
String ToString() const;
|
||||
|
||||
int GetSpecial() const { return color & 0x80000000 ? color & 0x7fffffff : -1; }
|
||||
static Color FromRaw(dword co) { Color c; c.color = co; return c; }
|
||||
static Color Special(int n) { Color c; c.SetSpecial(n); return c; }
|
||||
|
||||
int GetSpecial() const { return color & SPECIAL ? color & 0x7fffffff : -1; }
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
operator COLORREF() const { return (COLORREF) Get(); }
|
||||
|
|
@ -87,10 +97,29 @@ public:
|
|||
operator dword() const { return Get(); }
|
||||
#endif
|
||||
|
||||
Color Resolved() { return FromRaw(Get()); }
|
||||
|
||||
private:
|
||||
Color(int);
|
||||
};
|
||||
|
||||
struct SColor : Color { // this is supposed to be static / global
|
||||
static void Refresh();
|
||||
static void Write(Color c, Color val);
|
||||
|
||||
SColor(Color (*fn)() = NULL);
|
||||
explicit SColor(Color c) : SColor() { Write(*this, c); }
|
||||
void operator=(Color c) { Write(*this, c); }
|
||||
#ifdef _DEBUG
|
||||
~SColor();
|
||||
#endif
|
||||
};
|
||||
|
||||
struct AColor : Color {
|
||||
AColor(Color c) { color = c.Resolved().GetRaw() | ACOLOR; } // works for Null as well...
|
||||
AColor(int r, int g, int b) : AColor(Color(r, g, b)) {}
|
||||
};
|
||||
|
||||
RGBA operator*(int alpha, Color c);
|
||||
|
||||
inline Color StraightColor(RGBA rgba) { return Color(rgba.r, rgba.g, rgba.b); }
|
||||
|
|
@ -100,10 +129,6 @@ typedef Color (*ColorF)();
|
|||
inline hash_t GetHashValue(Color c) { return c.GetHashValue(); }
|
||||
inline Color Nvl(Color a, Color b) { return IsNull(a) ? b : a; }
|
||||
|
||||
template<>
|
||||
String AsString(const Color& c);
|
||||
|
||||
|
||||
inline Color GrayColor(int a = 128) { return Color(a, a, a); }
|
||||
|
||||
inline Color Black() { return Color(0, 0, 0); }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef CORE_H
|
||||
#define CORE_H
|
||||
|
||||
#define UPP_VERSION 0x20240900
|
||||
#define UPP_VERSION 0x20241100
|
||||
|
||||
#ifndef flagMT
|
||||
#define flagMT // MT is now always on
|
||||
|
|
|
|||
|
|
@ -161,6 +161,11 @@ inline dword FoldHash(dword h)
|
|||
|
||||
#endif
|
||||
|
||||
inline dword FoldHash32(dword h)
|
||||
{
|
||||
return SwapEndian32(0x8e86671b * h);
|
||||
}
|
||||
|
||||
inline byte Saturate255(int x) { return byte(~(x >> 24) & (x | (-(x >> 8) >> 24)) & 0xff); }
|
||||
|
||||
force_inline
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
#ifdef _DEBUG
|
||||
#define NEWBLOCKSTREAM
|
||||
#endif
|
||||
|
||||
enum {
|
||||
STRM_ERROR = 0x20,
|
||||
STRM_READ = 0x10,
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ Color are needed instead of global Color constants on many platforms,
|
|||
because often global variables are not allowed when using dynamic
|
||||
libraries.&]
|
||||
[s7; [%-*@3 fn]-|Pointer to a function returning Color.&]
|
||||
[s0; &]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Color`:`:Color`(RGBA`):%- [* Color]([_^RGBA^ RGBA]_[*@3 rgba])&]
|
||||
[s2; Conversion from a RGBA structure [%-*@3 rgba].&]
|
||||
|
|
@ -147,7 +147,7 @@ F_[*@3 cr])&]
|
|||
[s2; Creates Color from COLORREF.&]
|
||||
[s7; [%-*C@3 cr]-|COLORREF.&]
|
||||
[s7; [*/ Return value]-|Color.&]
|
||||
[s3; &]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Color`:`:operator dword`(`)const:%- [* operator_dword]()_[@(0.0.255) const]&]
|
||||
[s6;%- Not available on Win32&]
|
||||
|
|
@ -158,16 +158,53 @@ etRaw]().&]
|
|||
[s5;:Color`:`:operator RGBA`(`)const:%- [* operator_RGBA]()_[@(0.0.255) const]&]
|
||||
[s2; Returns a RGBA structure containing the color information.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Color`:`:ToString`(`)const:%- String [* ToString]() [@(0.0.255) const]&]
|
||||
[s2; Converts Color to textual form.&]
|
||||
[s0; &]
|
||||
[ {{10000@(113.42.0) [s0; [*@(229)4 SColor]]}}&]
|
||||
[s3;%- &]
|
||||
[s1;:Upp`:`:SColor:%- [@(0.0.255) struct ][*3 SColor][3 ][@(0.0.255)3 :][3
|
||||
Color]&]
|
||||
[s2; This creates special kind of `"logical`" color constant that
|
||||
is defined by function which is reevaluated on GUI theme change,
|
||||
thus allowing color to react to the new theme. Instances of this
|
||||
class must have static storage duration (cannot be stack nor
|
||||
thread variables). Number of SColor definitions is limited for
|
||||
performance reasons to about 1000. The SColor instances can be
|
||||
copied to normal Color while maintaining its dynamic feature.&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Constructor Detail]]}}&]
|
||||
[s3; &]
|
||||
[s5;:Upp`:`:SColor`:`:SColor`(Color`(`*`)`(`)`):%- [* SColor](Color
|
||||
([@(0.0.255) `*]fn)() [@(0.0.255) `=] [@3 0])&]
|
||||
[s2; Creates SColor with color definition function.&]
|
||||
[s0; &]
|
||||
[ {{10000@(113.42.0) [s0; [*@(229)4 AColor]]}}&]
|
||||
[s3;%- &]
|
||||
[s1;:Upp`:`:AColor:%- [@(0.0.255) struct ][*3 AColor][3 ][@(0.0.255)3 :][3
|
||||
Color]&]
|
||||
[s2; This special kind of Color logical constant is created from
|
||||
normal color. In light theme, color is used unchanged. In dark
|
||||
theme, color is adjusted using [%-* DarkThemeCached] function.
|
||||
The AColor instances can be copied to normal Color while maintaining
|
||||
its dynamic feature. [/ (Unlike SColor there are no limitations
|
||||
with respect to storage duration).]&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Constructor Detail]]}}&]
|
||||
[s3;%- &]
|
||||
[s5;:Upp`:`:AColor`:`:AColor`(Color`):%- [* AColor](Color [*@3 c])&]
|
||||
[s5;:Upp`:`:AColor`:`:AColor`(int`,int`,int`):%- [* AColor]([@(0.0.255) int]
|
||||
[*@3 r], [@(0.0.255) int] [*@3 g], [@(0.0.255) int] [*@3 b])&]
|
||||
[s2; Creates AColor.&]
|
||||
[s0; &]
|
||||
[s0;%- &]
|
||||
[ {{10000@(113.42.0) [s0; [*@(229)4 Utility functions]]}}&]
|
||||
[s3;%- &]
|
||||
[s5;:GetRValue`(dword`):%- [@(0.0.255) int]_[* GetRValue]([_^dword^ dword]_[*@3 c])&]
|
||||
[s2; Returns red component from a platform specific value.&]
|
||||
[s7; [%-*C@3 c]-|Platform specific value.&]
|
||||
[s7; [*/ Return value]-|Red component.&]
|
||||
[s3; &]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:GetGValue`(dword`):%- [@(0.0.255) int]_[* GetGValue]([_^dword^ dword]_[*@3 c])&]
|
||||
[s2; Returns green component from a platform specific value.&]
|
||||
|
|
@ -205,13 +242,6 @@ etRaw]().&]
|
|||
[s7; [*/ Return value]-|a if not Null, b otherwise.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:AsString`(const Color`&`):%- [@(0.0.255) template]_<>_[_^String^ String]_[* AsString](
|
||||
[@(0.0.255) const]_[_^Color^ Color][@(0.0.255) `&]_[*@3 c])&]
|
||||
[s2; Converts Color to textual form.&]
|
||||
[s7; [%-*C@3 c]-|Color.&]
|
||||
[s7; [*/ Return value]-|Textual form.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:RGBtoHSV`(double`,double`,double`,double`&`,double`&`,double`&`):%- [@(0.0.255) vo
|
||||
id]_[* RGBtoHSV]([@(0.0.255) double]_[*@3 r], [@(0.0.255) double]_[*@3 g],
|
||||
[@(0.0.255) double]_[*@3 b], [@(0.0.255) double`&]_[*@3 h], [@(0.0.255) double`&]_[*@3 s],
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ void Ctrl::StateH(int reason)
|
|||
if((*statehook()[i])(this, reason))
|
||||
return;
|
||||
StateDeep(reason);
|
||||
if(reason == OPEN)
|
||||
DoSkin();
|
||||
FullRefreshCleanup();
|
||||
}
|
||||
|
||||
|
|
@ -699,13 +701,6 @@ Size Ctrl::Dsize;
|
|||
Size Ctrl::Csize;
|
||||
bool Ctrl::IsNoLayoutZoom;
|
||||
|
||||
/*
|
||||
void InitRichTextZoom()
|
||||
{
|
||||
SetRichTextStdScreenZoom(96 * GetTextSize(sZoomText, StdFont()).cy / 13, 600);
|
||||
Ctrl::ReSkin();
|
||||
}
|
||||
*/
|
||||
void InitRichTextZoom()
|
||||
{
|
||||
Size h = 96 * Ctrl::Bsize / Ctrl::Dsize;
|
||||
|
|
@ -925,9 +920,10 @@ INITBLOCK {
|
|||
whenSetStdFont = &Ctrl::ReSkin;
|
||||
}
|
||||
|
||||
void (*Ctrl::skin)();
|
||||
void (**Ctrl::skin)();
|
||||
int Ctrl::skini;
|
||||
|
||||
void CtrlSetDefaultSkin(void (*_skin)())
|
||||
void CtrlSetDefaultSkin(void (**_skin)())
|
||||
{
|
||||
Ctrl::skin = _skin;
|
||||
}
|
||||
|
|
@ -935,7 +931,7 @@ void CtrlSetDefaultSkin(void (*_skin)())
|
|||
void Ctrl::SetSkin(void (*_skin)())
|
||||
{
|
||||
GuiLock __;
|
||||
skin = _skin;
|
||||
skin[0] = _skin;
|
||||
ReSkin();
|
||||
}
|
||||
|
||||
|
|
@ -947,21 +943,49 @@ void Ctrl::ReSkin()
|
|||
return;
|
||||
lock++;
|
||||
ChReset();
|
||||
Iml::ResetAll();
|
||||
Csize.cx = Dsize.cx = IsNoLayoutZoom;
|
||||
if(skin)
|
||||
(*skin)();
|
||||
Iml::SkinAll();
|
||||
if(skin[skini])
|
||||
(*skin[skini])();
|
||||
Csize.cx = Dsize.cx = IsNoLayoutZoom;
|
||||
Csizeinit();
|
||||
ChFinish();
|
||||
Vector<Ctrl *> ctrl = GetTopCtrls();
|
||||
for(int i = 0; i < ctrl.GetCount(); i++) {
|
||||
ctrl[i]->RefreshLayoutDeep();
|
||||
ctrl[i]->DoSkin();
|
||||
ctrl[i]->RefreshFrame();
|
||||
}
|
||||
lock--;
|
||||
}
|
||||
|
||||
static bool s_skin_change_sensitive;
|
||||
|
||||
void Ctrl::SkinChangeSensitive(bool b)
|
||||
{
|
||||
s_skin_change_sensitive = b;
|
||||
}
|
||||
|
||||
void Ctrl::PostReSkin()
|
||||
{ // use timer so that it is done just once if there are multiple windows
|
||||
static TimeCallback tm;
|
||||
if(s_skin_change_sensitive)
|
||||
tm.KillPost([=] { ReSkin(); });
|
||||
}
|
||||
|
||||
void Ctrl::DoSkin()
|
||||
{
|
||||
for(Ctrl& q : *this)
|
||||
q.DoSkin();
|
||||
Skin();
|
||||
}
|
||||
|
||||
void Ctrl::SwapDarkLight()
|
||||
{
|
||||
skini = skini ? 0 : IsDarkTheme() ? 1 : 2;
|
||||
ReSkin();
|
||||
}
|
||||
|
||||
CH_INT(GUI_GlobalStyle, GUISTYLE_CLASSIC);
|
||||
CH_INT(GUI_DragFullWindow, 1);
|
||||
CH_INT(GUI_PopUpEffect, GUIEFFECT_SLIDE);
|
||||
|
|
|
|||
|
|
@ -775,14 +775,15 @@ private:
|
|||
static Size Csize;
|
||||
static bool IsNoLayoutZoom;
|
||||
static void Csizeinit();
|
||||
static void (*skin)();
|
||||
static void (**skin)(); // [0] - default, [1] - std light, [2] - std dark (1, 2 for debug mode testing)
|
||||
static int skini; // normally 0, allows changing skin in debug mode (to test dark skin), with Ctrl-Alt-Shift-F12
|
||||
|
||||
static void (*cancel_preedit)();
|
||||
|
||||
friend void InitRichTextZoom();
|
||||
friend void AvoidPaintingCheck__();
|
||||
friend dword GetKeyStateSafe(dword what);
|
||||
friend void CtrlSetDefaultSkin(void (*_skin)());
|
||||
friend void CtrlSetDefaultSkin(void (**_skin)());
|
||||
friend class DHCtrl;
|
||||
friend class TopFrameDraw;
|
||||
friend class ViewDraw;
|
||||
|
|
@ -1058,6 +1059,8 @@ public:
|
|||
|
||||
virtual void SetMinSize(Size sz) {}
|
||||
|
||||
virtual void Skin() {}
|
||||
|
||||
Event<> WhenAction;
|
||||
|
||||
void AddChild(Ctrl *child);
|
||||
|
|
@ -1401,6 +1404,11 @@ public:
|
|||
static void SetDarkThemeEnabled(bool set = true);
|
||||
static bool IsDarkThemeEnabled();
|
||||
|
||||
static void SkinChangeSensitive(bool b = true);
|
||||
|
||||
static void SwapDarkLight();
|
||||
static void SwapDarkLightKey(dword key);
|
||||
|
||||
static bool ClickFocus();
|
||||
static void ClickFocus(bool cf);
|
||||
|
||||
|
|
@ -1424,6 +1432,8 @@ public:
|
|||
static void GlobalBackBuffer(bool b = true);
|
||||
|
||||
static void ReSkin();
|
||||
static void PostReSkin();
|
||||
void DoSkin();
|
||||
|
||||
String Name() const;
|
||||
static String Name(Ctrl *ctrl);
|
||||
|
|
|
|||
|
|
@ -12,9 +12,19 @@ bool Ctrl::ignorekeyup;
|
|||
Ptr<Ctrl> Ctrl::defferedSetFocus;
|
||||
Vector< Ptr<Ctrl> > Ctrl::defferedChildLostFocus;
|
||||
|
||||
static dword s_swapdarklight_key
|
||||
#ifdef _DEBUG
|
||||
= K_CTRL|K_MULTIPLY
|
||||
#endif
|
||||
;
|
||||
|
||||
static bool s_hotkey;
|
||||
|
||||
void Ctrl::SwapDarkLightKey(dword key)
|
||||
{
|
||||
s_swapdarklight_key = key;
|
||||
}
|
||||
|
||||
void Ctrl::RefreshAccessKeys()
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
@ -48,6 +58,10 @@ bool Ctrl::DispatchKey(dword keycode, int count)
|
|||
LLOG("DispatchKey " << keycode << " (0x" << Sprintf("%08x", keycode)
|
||||
<< ", " << GetKeyDesc(keycode) << "), count:" << count
|
||||
<< " focusCtrl:" << UPP::Name(focusCtrl) << " focusCtrlWnd:" << UPP::Name(focusCtrlWnd));
|
||||
#if defined(_DEBUG) || defined(flagDEBUGCODE)
|
||||
if(s_swapdarklight_key && keycode == s_swapdarklight_key)
|
||||
SwapDarkLight();
|
||||
#endif
|
||||
if((keycode & K_KEYUP) && ignorekeyup)
|
||||
{
|
||||
ignorekeyup = false;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ bool RunningOnWayland()
|
|||
return running_on_wayland;
|
||||
}
|
||||
|
||||
void Ctrl::ThemeChanged(void *)
|
||||
{
|
||||
PostReSkin();
|
||||
}
|
||||
|
||||
void InitGtkApp(int argc, char **argv, const char **envptr)
|
||||
{
|
||||
LLOG(rmsecs() << " InitGtkApp");
|
||||
|
|
@ -91,6 +96,11 @@ void InitGtkApp(int argc, char **argv, const char **envptr)
|
|||
#if CATCH_ERRORS
|
||||
g_log_set_default_handler (CatchError, 0);
|
||||
#endif
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
if(settings) {
|
||||
g_signal_connect_swapped(settings, "notify::gtk-theme-name", G_CALLBACK(Ctrl::ThemeChanged), NULL);
|
||||
g_signal_connect_swapped(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(Ctrl::ThemeChanged), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void ExitGtkApp()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
static void AddEvent(gpointer user_data, int type, const Value& value, GdkEvent *event);
|
||||
static void FetchEvents(bool may_block);
|
||||
|
||||
static void ThemeChanged(void *);
|
||||
|
||||
/*
|
||||
_DBG_
|
||||
static void AddEvent(gpointer user_data, int type, const Value& value);
|
||||
|
|
|
|||
|
|
@ -593,9 +593,6 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
|||
case WM_ACTIVATE:
|
||||
LLOG("WM_ACTIVATE " << Name() << ", wParam = " << (int)wParam << ", focusCtrlWnd = " << UPP::Name(focusCtrlWnd) << ", raw = " << (void *)::GetFocus());
|
||||
ignorekeyup = true;
|
||||
case 0x031A: // WM_THEMECHANGED
|
||||
XpClear();
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
LLOG("WM_SETFOCUS " << Name() << ", focusCtrlWnd = " << UPP::Name(focusCtrlWnd) << ", raw = " << (void *)::GetFocus());
|
||||
if(this != focusCtrlWnd || focusCtrl && focusCtrlWnd != focusCtrl->GetTopCtrl()) { // second condition fixes popup issue when clicking dialog parent
|
||||
|
|
@ -664,13 +661,10 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
|||
}
|
||||
return 0L;
|
||||
#endif
|
||||
/* case WM_SETTINGCHANGE:
|
||||
case WM_SETTINGCHANGE:
|
||||
case 0x031A: // WM_THEMECHANGED
|
||||
ReSkin();
|
||||
RefreshLayoutDeep();
|
||||
RefreshFrame();
|
||||
PostReSkin();
|
||||
break;
|
||||
*/
|
||||
/*
|
||||
case WM_IME_COMPOSITION:
|
||||
HIMC himc = ImmGetContext(hwnd);
|
||||
|
|
|
|||
|
|
@ -2513,6 +2513,14 @@ be statically overloaded to receive minimal size of layout.&]
|
|||
[s7;i1120;a17; [%-*C@3 sz]-|Minimal size of layout.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Ctrl`:`:Skin`(`):%- [@(0.0.255) void] [* Skin]()&]
|
||||
[s2; Called when the application skin (e.g. widget appearance, system
|
||||
colors or dark / light theme switch) changes. It is called in
|
||||
children first order. Application should use this to adjust colors,
|
||||
which might actually include resetting some widgets and data
|
||||
content.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Ctrl`:`:Csizeinit`(`):%- [@(0.0.255) static] [@(0.0.255) void]_[* Csizeinit]()&]
|
||||
[s2;b17;a17; Sets zoom factor used to scale layouts (to scale zoomed
|
||||
positioning methods like LeftPosZ). Horizontal distances are
|
||||
|
|
@ -2561,8 +2569,41 @@ ize]_[*@3 sz])&]
|
|||
[s5;:Ctrl`:`:NoLayoutZoom`(`):%- [@(0.0.255) static] [@(0.0.255) void]_[* NoLayoutZoom]()&]
|
||||
[s2;b17;a17; Sets scaling factor to (1, 1). Same as SetZoomSize(Size(1,
|
||||
1), Size(1, 1)).&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Ctrl`:`:SetSkin`(void`(`*`)`(`)`):%- [@(0.0.255) static]
|
||||
[@(0.0.255) void] [* SetSkin]([@(0.0.255) void] ([@(0.0.255) `*][*@3 skin])())&]
|
||||
[s2; Sets the GUI theme. [%-*@3 skin] is routine that sets appearance
|
||||
of everything, by altering predefined SColors, changing images
|
||||
and changing widget appearance through `::StyleDefault().Write().
|
||||
See CtrlLib/Ch.cpp for example.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Ctrl`:`:SkinChangeSensitive`(bool`):%- [@(0.0.255) static]
|
||||
[@(0.0.255) void] [* SkinChangeSensitive]([@(0.0.255) bool] [*@3 b] [@(0.0.255) `=]
|
||||
[@(0.0.255) true])&]
|
||||
[s2; If not active (which is default), the appearance of U`+`+ application
|
||||
is established once at the start and does not change if user
|
||||
switches host platform theme. If active, U`+`+ changes appearance
|
||||
when host platform theme changes. Note that activating this feature
|
||||
requires additional work and thorough testing to make sure that
|
||||
all colors adequately react to changes between light and dark
|
||||
modes.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Ctrl`:`:SwapDarkLight`(`):%- [@(0.0.255) static] [@(0.0.255) void]
|
||||
[* SwapDarkLight]()&]
|
||||
[s2; This debugging feature toggles between dark and light mode to
|
||||
make skin change sensitive application development easier.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:Upp`:`:Ctrl`:`:SwapDarkLightKey`(dword`):%- [@(0.0.255) static]
|
||||
[@(0.0.255) void] [* SwapDarkLightKey](dword [*@3 key])&]
|
||||
[s2; This sets a special key that when presses calls SwapDarkLight.
|
||||
0 means no key. Normally, in debug mode Ctrl`+Num`[`*`] is the
|
||||
default key, in release mode default is 0.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[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
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,6 +4,12 @@ namespace Upp {
|
|||
|
||||
#define LTIMING(x) // DTIMING(x)
|
||||
|
||||
Color SColorEvenRow()
|
||||
{
|
||||
static SColor s([] { return Blend(SColorMark, SColorPaper, 220); });
|
||||
return s;
|
||||
}
|
||||
|
||||
ArrayCtrl::Column::Column() {
|
||||
convert = NULL;
|
||||
edit = NULL;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ Callback1<One<Ctrl>&> DefaultCtrlFactory()
|
|||
return callback(DefaultCtrlFactoryFn<T>);
|
||||
}
|
||||
|
||||
Color SColorEvenRow();
|
||||
|
||||
class ArrayCtrl : public Ctrl {
|
||||
public:
|
||||
virtual void CancelMode();
|
||||
|
|
@ -684,8 +686,8 @@ public:
|
|||
ArrayCtrl& Grid(bool b = true) { return VertGrid(b).HorzGrid(b); }
|
||||
ArrayCtrl& NoGrid() { return Grid(false); }
|
||||
ArrayCtrl& GridColor(Color c) { gridcolor = c; return *this; }
|
||||
ArrayCtrl& EvenRowColor(Color paper = Blend(SColorMark, SColorPaper, 220), Color ink = SColorText);
|
||||
ArrayCtrl& OddRowColor(Color paper = SColorInfo, Color ink = SColorText);
|
||||
ArrayCtrl& EvenRowColor(Color paper = SColorEvenRow(), Color ink = SColorText);
|
||||
ArrayCtrl& OddRowColor(Color paper = SColorInfo(), Color ink = SColorText);
|
||||
ArrayCtrl& NoCursor(bool b = true) { nocursor = b; return *this; }
|
||||
ArrayCtrl& MouseMoveCursor(bool b = true) { mousemove = b; return *this; }
|
||||
ArrayCtrl& NoMouseMoveCursor() { return MouseMoveCursor(false); }
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@ void ChFlatSkin();
|
|||
void ChFlatDarkSkin();
|
||||
void ChFlatGraySkin();
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
void ChHostSkinLight();
|
||||
void ChHostSkinDark();
|
||||
#endif
|
||||
|
||||
Vector<Tuple<void (*)(), String>> GetAllChSkins();
|
||||
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -443,12 +443,11 @@ void ChHostSkin()
|
|||
|
||||
{
|
||||
ScrollBar::Style& s = ScrollBar::StyleDefault().Write();
|
||||
static gboolean stepper;
|
||||
static gint minslider;
|
||||
ONCELOCK {
|
||||
static GtkWidget *proto = (GtkWidget *)gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL); // to get style params
|
||||
gboolean stepper;
|
||||
gint minslider;
|
||||
GtkWidget *proto = (GtkWidget *)gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL); // to get style params
|
||||
gtk_widget_style_get(proto, "has-backward-stepper", &stepper, "min-slider-length", &minslider, NULL);
|
||||
}
|
||||
g_object_unref(proto);
|
||||
if(!stepper)
|
||||
s.arrowsize = 0;
|
||||
Gtk_New("scrollbar.horizontal.bottom");
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ bool IsSystemThemeDark()
|
|||
return GetEnv("UPP_DARKMODE__") == "1" ? !b : b;
|
||||
}
|
||||
|
||||
void ChHostSkin()
|
||||
void ChHostSkin0()
|
||||
{
|
||||
if(Ctrl::IsUHDEnabled()) {
|
||||
HRESULT (STDAPICALLTYPE *SetProcessDpiAwareness)(int);
|
||||
|
|
@ -395,8 +395,6 @@ void ChHostSkin()
|
|||
}
|
||||
}
|
||||
|
||||
sEmulateDarkTheme = Ctrl::IsDarkThemeEnabled() && IsSystemThemeDark() && !IsDark(Color::FromCR(GetSysColor(COLOR_WINDOW)));
|
||||
|
||||
NONCLIENTMETRICSW ncm;
|
||||
#if (WINVER >= 0x0600 && !defined(__MINGW32_VERSION))
|
||||
ncm.cbSize = sizeof(ncm) - sizeof(ncm.iPaddedBorderWidth); // WinXP does not like it...
|
||||
|
|
@ -742,6 +740,24 @@ void ChHostSkin()
|
|||
ChClassicSkin();
|
||||
}
|
||||
|
||||
void ChHostSkin()
|
||||
{
|
||||
sEmulateDarkTheme = Ctrl::IsDarkThemeEnabled() && IsSystemThemeDark() && !IsDark(Color::FromCR(GetSysColor(COLOR_WINDOW)));
|
||||
ChHostSkin0();
|
||||
}
|
||||
|
||||
void ChHostSkinLight()
|
||||
{
|
||||
sEmulateDarkTheme = false;
|
||||
ChHostSkin0();
|
||||
}
|
||||
|
||||
void ChHostSkinDark()
|
||||
{
|
||||
sEmulateDarkTheme = true;
|
||||
ChHostSkin0();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ void ColorPusher::Paint(Draw& w)
|
|||
voidtext, StdFont(), SColorText());
|
||||
else {
|
||||
auto DrawColor = [&](int x, int y, int cx, int cy) {
|
||||
if(color.GetSpecial() >= 0) {
|
||||
if(color.GetSpecial() >= 0 && color.GetSpecial() < 18) {
|
||||
Color c = RealizeColor(color);
|
||||
w.DrawRect(x, y, cx / 2, cy, c);
|
||||
w.DrawRect(x + cx / 2, y, cx - cx / 2, cy, DarkTheme(c));
|
||||
|
|
|
|||
|
|
@ -1016,48 +1016,48 @@ IMAGE_DATA(177,36,121,75,73,73,141,55,253,31,56,115,124,157,0,0,0,0,0,0,0,0,0,0,
|
|||
IMAGE_END_DATA(3200, 18)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,157,93,76,91,101,24,199,201,230,149,49,25,209,196,196,11,111,77,100,102,217,2,94,232,110,77,212,11,227)
|
||||
IMAGE_DATA(141,81,47,182,101,137,209,160,67,157,204,161,219,112,131,77,230,116,147,201,128,169,115,48,153,176,249,193,230,198,156,211)
|
||||
IMAGE_DATA(11,103,208,100,113,140,209,66,203,96,124,13,246,129,180,12,218,158,126,156,246,244,227,241,20,44,235,224,61,165,125,125)
|
||||
IMAGE_DATA(207,251,84,120,254,225,23,104,195,211,247,252,127,79,9,92,80,200,201,205,201,205,89,72,57,125,32,207,58,112,126,141)
|
||||
IMAGE_DATA(54,248,251,186,36,214,106,191,213,21,12,222,191,108,233,131,247,221,187,100,217,108,150,46,201,185,39,49,111,63,89,16)
|
||||
IMAGE_DATA(140,197,162,0,16,211,223,226,76,127,28,86,157,48,244,71,97,104,160,181,48,152,96,232,194,102,181,173,229,181,145,103)
|
||||
IMAGE_DATA(86,231,190,152,152,191,220,184,202,29,139,168,16,188,89,9,254,161,42,240,15,31,129,192,72,51,196,194,46,253,161,124)
|
||||
IMAGE_DATA(16,139,120,117,60,211,183,195,147,16,82,125,161,179,85,143,217,19,243,29,13,249,74,84,243,232,179,53,224,27,168,6)
|
||||
IMAGE_DATA(165,187,28,38,218,222,0,231,165,34,112,217,42,192,213,85,6,46,235,86,152,180,148,232,20,235,215,229,0,75,211,42)
|
||||
IMAGE_DATA(111,98,190,251,120,190,22,14,140,129,203,94,3,147,29,123,192,209,186,9,2,142,139,250,153,202,191,103,199,223,187,103)
|
||||
IMAGE_DATA(206,143,119,179,53,21,168,51,243,71,31,215,166,186,71,131,58,1,128,136,127,106,46,18,232,133,224,104,13,168,55,42)
|
||||
IMAGE_DATA(32,112,173,4,252,253,133,224,235,93,3,17,95,15,216,234,243,103,230,237,117,5,161,88,36,0,17,229,47,8,187,126)
|
||||
IMAGE_DATA(5,237,118,51,132,198,14,235,115,123,33,48,92,10,129,129,34,240,95,93,11,190,43,207,131,215,246,20,68,188,86,176)
|
||||
IMAGE_DATA(29,74,154,175,45,8,70,53,5,180,137,51,16,114,52,234,103,214,130,122,93,63,115,40,126,230,171,224,235,121,9,188)
|
||||
IMAGE_DATA(246,103,65,233,92,13,158,142,149,16,86,218,193,86,125,103,222,182,63,95,141,105,46,125,182,1,130,183,170,64,29,41)
|
||||
IMAGE_DATA(215,103,139,193,223,247,138,62,251,130,126,230,211,160,88,159,0,207,229,21,224,190,244,136,62,223,6,241,153,196,252,159)
|
||||
IMAGE_DATA(101,43,70,199,71,44,110,165,191,41,234,235,175,7,111,223,65,240,246,86,130,183,103,55,40,246,29,160,216,182,128,167)
|
||||
IMAGE_DATA(171,24,60,214,34,240,88,94,7,213,209,26,107,175,88,233,78,204,175,123,242,129,141,251,94,126,248,216,133,109,143,58)
|
||||
IMAGE_DATA(59,119,45,87,83,178,115,185,218,94,150,231,41,125,238,161,106,49,207,254,255,150,194,245,57,235,177,175,129,66,161,80)
|
||||
IMAGE_DATA(40,20,10,133,66,161,80,40,20,10,133,66,161,80,40,20,10,133,66,201,202,116,150,231,169,50,192,238,153,109,145,229)
|
||||
IMAGE_DATA(157,118,48,55,24,238,105,15,211,97,249,136,255,242,136,153,208,14,166,35,219,59,237,224,78,48,221,167,218,3,182,23)
|
||||
IMAGE_DATA(89,201,6,247,139,117,7,217,242,220,95,172,59,200,54,247,70,59,88,168,123,200,86,255,70,59,88,104,63,247,102,179)
|
||||
IMAGE_DATA(255,197,176,135,255,131,127,217,123,32,255,248,123,37,255,248,123,32,255,11,127,7,60,254,101,126,63,196,38,155,252,99)
|
||||
IMAGE_DATA(187,88,136,59,72,215,63,182,3,108,48,253,179,174,39,232,60,1,33,231,41,8,141,183,76,189,208,79,155,56,11,218)
|
||||
IMAGE_DATA(228,185,233,23,12,78,254,146,33,231,56,248,153,143,248,117,166,129,172,29,204,231,127,246,53,136,236,152,62,63,137,227)
|
||||
IMAGE_DATA(246,153,140,48,123,7,169,252,207,113,111,82,199,249,105,17,70,104,252,116,198,152,185,131,116,253,155,221,49,53,167,196)
|
||||
IMAGE_DATA(225,252,145,11,217,254,103,239,92,70,71,99,78,10,228,4,23,102,125,13,164,227,95,86,71,99,154,197,225,248,129,27)
|
||||
IMAGE_DATA(60,255,242,58,178,249,94,24,193,177,239,184,65,243,47,177,35,155,111,197,241,247,113,110,176,252,203,236,200,230,152,56)
|
||||
IMAGE_DATA(70,155,184,65,243,47,177,35,155,70,129,124,195,13,154,127,137,29,217,28,21,138,122,171,129,11,60,255,242,58,178,249)
|
||||
IMAGE_DATA(90,44,55,143,112,129,229,95,102,71,54,245,98,185,81,199,5,154,127,137,29,217,28,22,203,245,175,184,64,243,47,177)
|
||||
IMAGE_DATA(35,155,67,66,9,140,124,201,5,154,127,137,29,217,124,33,152,207,185,192,242,47,179,35,155,131,98,25,174,229,2,207)
|
||||
IMAGE_DATA(191,188,142,108,106,196,114,173,154,11,52,255,18,59,178,57,32,148,169,63,106,202,1,154,127,137,29,217,124,38,150,193)
|
||||
IMAGE_DATA(253,92,96,249,151,217,145,77,165,96,62,229,2,205,191,196,142,108,246,9,197,55,176,151,11,60,255,242,58,178,249,68)
|
||||
IMAGE_DATA(44,253,31,115,129,229,95,102,71,54,123,196,210,247,17,23,104,254,37,118,100,179,91,44,87,43,184,64,243,47,177,35)
|
||||
IMAGE_DATA(155,15,133,226,237,221,197,5,154,127,137,29,217,236,20,76,57,23,88,254,101,118,100,83,38,150,158,29,92,224,249,151)
|
||||
IMAGE_DATA(215,145,205,118,177,92,249,128,11,52,255,18,59,178,41,21,138,210,189,141,11,52,255,18,59,26,179,85,28,246,45,92)
|
||||
IMAGE_DATA(96,249,151,217,209,152,247,5,242,30,23,104,254,37,118,52,166,68,28,182,205,92,224,249,151,215,209,152,119,133,225,233)
|
||||
IMAGE_DATA(218,196,5,154,127,137,29,141,41,22,71,231,59,25,147,236,195,44,255,201,59,72,190,79,86,199,212,108,20,135,245,237)
|
||||
IMAGE_DATA(140,49,195,61,107,7,76,255,146,58,166,230,45,129,188,153,17,102,61,247,89,254,19,59,184,203,191,132,142,243,83,36)
|
||||
IMAGE_DATA(4,183,101,67,70,152,237,222,104,7,119,251,55,183,227,12,214,185,247,121,172,27,146,30,123,246,237,248,63,48,100,127)
|
||||
IMAGE_DATA(142,59,113,159,197,96,110,30,88,30,204,114,159,206,14,22,59,102,187,167,29,224,187,167,29,224,122,167,80,40,20,10)
|
||||
IMAGE_DATA(133,66,161,80,40,20,10,133,66,161,80,40,20,10,133,66,161,80,178,57,255,0,27,36,49,163,0,0,0,0,0,0)
|
||||
IMAGE_DATA(120,156,237,157,93,76,91,101,24,199,9,243,202,152,140,104,98,226,133,183,38,50,179,108,1,47,116,183,38,234,133,241)
|
||||
IMAGE_DATA(198,168,23,219,178,196,104,208,161,78,230,208,109,232,96,147,57,221,100,50,96,234,28,76,38,108,126,176,185,49,231,244)
|
||||
IMAGE_DATA(194,25,52,89,148,49,90,104,25,12,10,131,125,32,45,131,182,167,31,167,61,45,125,60,5,203,58,120,79,105,95,223)
|
||||
IMAGE_DATA(243,62,21,158,127,248,5,218,240,244,61,255,223,83,2,23,20,114,243,114,242,114,22,83,78,31,200,183,58,206,175,213)
|
||||
IMAGE_DATA(6,127,91,159,196,58,237,215,250,194,193,123,151,47,187,255,158,187,115,151,207,101,89,110,206,93,137,121,251,201,194,80)
|
||||
IMAGE_DATA(44,54,5,0,49,253,45,206,204,199,17,213,5,67,191,23,133,29,109,69,161,4,67,23,182,168,237,173,175,140,60,181)
|
||||
IMAGE_DATA(38,239,249,196,252,165,166,213,158,88,84,133,208,141,42,8,12,85,67,96,248,8,4,71,90,32,22,113,235,15,229,135)
|
||||
IMAGE_DATA(88,212,167,227,157,185,29,153,132,176,234,15,159,173,126,196,158,152,239,108,44,80,166,52,175,62,91,11,126,71,13,40)
|
||||
IMAGE_DATA(61,21,48,209,254,26,184,46,22,131,219,86,9,238,238,114,112,91,183,193,164,165,84,167,68,191,46,39,88,154,87,251)
|
||||
IMAGE_DATA(18,243,61,199,11,180,72,112,12,220,246,90,152,236,220,3,206,182,205,16,116,254,165,159,169,252,123,118,252,189,103,246)
|
||||
IMAGE_DATA(252,120,55,91,115,161,58,59,127,244,81,109,186,251,84,72,39,8,16,13,76,207,69,131,125,16,26,173,5,245,122,37)
|
||||
IMAGE_DATA(4,175,150,66,96,160,8,252,125,107,33,234,239,5,91,67,193,236,188,189,190,48,28,139,6,33,170,252,9,17,247,47)
|
||||
IMAGE_DATA(160,221,106,129,240,216,97,125,110,47,4,135,203,32,232,40,134,192,149,117,224,191,252,44,248,108,79,64,212,103,5,219)
|
||||
IMAGE_DATA(161,164,249,186,194,208,148,166,128,54,113,6,194,206,38,253,204,58,80,175,233,103,14,197,207,124,25,252,189,47,128,207)
|
||||
IMAGE_DATA(254,52,40,93,107,192,219,185,10,34,74,7,216,106,110,207,219,246,23,168,49,205,173,207,54,66,232,102,53,168,35,21)
|
||||
IMAGE_DATA(250,108,9,4,250,95,210,103,159,211,207,124,18,20,235,99,224,189,180,18,60,23,31,210,231,219,33,62,147,152,255,163)
|
||||
IMAGE_DATA(124,229,232,248,136,197,163,12,52,79,249,7,26,192,215,127,16,124,125,85,224,235,221,13,138,125,7,40,182,173,224,237)
|
||||
IMAGE_DATA(46,1,175,181,24,188,150,87,65,117,182,197,58,42,87,121,18,243,235,31,191,111,211,190,23,31,60,118,97,251,195,174)
|
||||
IMAGE_DATA(174,93,43,212,148,236,92,161,118,148,231,123,203,158,121,160,70,204,179,255,191,37,127,67,206,6,236,107,160,80,40,20)
|
||||
IMAGE_DATA(10,133,66,161,80,40,20,10,133,66,161,80,40,20,10,133,66,161,80,178,50,93,21,249,170,12,176,123,102,91,100,121)
|
||||
IMAGE_DATA(167,29,204,15,134,123,218,195,76,88,62,226,191,60,98,38,180,131,153,200,246,78,59,184,29,76,247,169,246,128,237,69)
|
||||
IMAGE_DATA(86,178,193,253,82,221,65,182,60,247,151,234,14,178,205,189,209,14,22,235,30,178,213,191,209,14,22,219,207,189,217,236)
|
||||
IMAGE_DATA(127,41,236,225,255,224,95,246,30,200,63,254,94,201,63,254,30,200,255,226,223,1,143,127,153,223,15,177,201,38,255,216)
|
||||
IMAGE_DATA(46,22,227,14,210,245,143,237,0,27,76,255,172,235,9,185,78,64,216,117,10,194,227,173,211,47,244,211,38,206,130,54)
|
||||
IMAGE_DATA(121,110,230,5,131,147,63,103,200,57,14,126,226,35,126,157,105,32,107,7,11,249,159,123,13,34,59,166,207,143,226,184)
|
||||
IMAGE_DATA(117,38,35,204,222,65,42,255,243,220,155,212,113,97,90,133,17,30,63,157,49,102,238,32,93,255,102,119,76,205,41,113)
|
||||
IMAGE_DATA(184,126,224,66,182,255,185,59,151,209,209,152,147,2,57,193,133,89,95,3,233,248,151,213,209,152,22,113,56,191,231,6)
|
||||
IMAGE_DATA(207,191,188,142,108,190,19,70,104,236,91,110,208,252,75,236,200,230,27,113,252,125,156,27,44,255,50,59,178,57,38,142)
|
||||
IMAGE_DATA(209,102,110,208,252,75,236,200,166,73,32,95,115,131,230,95,98,71,54,71,133,162,222,108,228,2,207,191,188,142,108,190)
|
||||
IMAGE_DATA(18,203,141,35,92,96,249,151,217,145,77,131,88,174,215,115,129,230,95,98,71,54,135,197,114,237,75,46,208,252,75,236)
|
||||
IMAGE_DATA(200,230,144,80,130,35,95,112,129,230,95,98,71,54,159,11,230,51,46,176,252,203,236,200,230,160,88,134,235,184,192,243)
|
||||
IMAGE_DATA(47,175,35,155,90,177,92,173,225,2,205,191,196,142,108,14,8,101,250,143,154,114,128,230,95,98,71,54,159,138,101,112)
|
||||
IMAGE_DATA(63,23,88,254,101,118,100,83,37,152,79,184,64,243,47,177,35,155,125,66,241,59,246,114,129,231,95,94,71,54,31,139)
|
||||
IMAGE_DATA(101,224,35,46,176,252,203,236,200,102,143,88,250,63,228,2,205,191,196,142,108,118,139,229,74,37,23,104,254,37,118,100)
|
||||
IMAGE_DATA(243,129,80,124,125,187,184,64,243,47,177,35,155,157,130,169,224,2,203,191,204,142,108,202,197,210,187,131,11,60,255,242)
|
||||
IMAGE_DATA(58,178,121,95,44,151,223,227,2,205,191,196,142,108,202,132,162,244,108,231,2,205,191,196,142,198,108,19,135,125,43,23)
|
||||
IMAGE_DATA(88,254,101,118,52,230,93,129,188,195,5,154,127,137,29,141,41,21,135,109,11,23,120,254,229,117,52,230,109,97,120,187)
|
||||
IMAGE_DATA(55,115,129,230,95,98,71,99,74,196,209,245,86,198,36,251,48,203,127,242,14,146,239,147,213,49,53,155,196,97,125,51)
|
||||
IMAGE_DATA(99,204,112,207,218,1,211,191,164,142,169,121,67,32,175,103,132,89,207,125,150,255,196,14,238,240,47,161,227,194,20,11)
|
||||
IMAGE_DATA(193,99,217,152,17,102,187,55,218,193,157,254,205,237,56,139,117,254,125,94,235,198,164,199,158,123,59,254,15,12,217,159)
|
||||
IMAGE_DATA(227,73,220,103,49,152,91,0,150,7,179,220,167,179,131,165,142,217,238,105,7,248,238,105,7,184,222,41,20,10,133,66)
|
||||
IMAGE_DATA(161,80,40,20,10,133,66,161,80,40,20,10,133,66,161,80,40,148,108,206,63,94,52,49,103,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(1344, 2)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
|
|
@ -1841,94 +1841,94 @@ IMAGE_DATA(208,110,49,240,205,32,233,249,83,229,216,196,249,251,47,203,118,104,1
|
|||
IMAGE_END_DATA(800, 5)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
IMAGE_DATA(120,156,237,156,187,111,92,69,20,198,247,79,136,168,145,72,157,42,37,157,211,32,81,65,26,23,41,144,82,165,160,74)
|
||||
IMAGE_DATA(153,42,118,25,65,26,10,36,68,129,210,32,69,145,66,71,148,6,201,66,66,136,138,68,4,194,35,137,9,142,193,113)
|
||||
IMAGE_DATA(98,123,189,126,96,199,9,195,206,189,119,246,206,227,156,51,231,204,204,238,94,59,158,232,211,134,189,119,94,191,239,220)
|
||||
IMAGE_DATA(51,179,179,75,190,61,209,59,209,83,115,61,180,188,241,65,239,199,55,231,122,202,150,126,15,175,225,213,251,100,168,133)
|
||||
IMAGE_DATA(161,126,104,180,208,188,71,180,83,213,245,235,249,106,218,241,219,24,213,189,5,212,185,220,244,109,174,221,10,219,168,198)
|
||||
IMAGE_DATA(140,245,59,188,246,253,226,130,122,251,179,183,218,54,22,234,247,157,190,177,49,15,239,211,37,104,163,25,131,211,247,101)
|
||||
IMAGE_DATA(151,121,165,203,117,125,167,141,133,118,12,149,188,190,168,178,180,177,168,70,227,45,85,63,99,252,185,252,114,253,43,17)
|
||||
IMAGE_DATA(63,185,241,91,226,249,1,219,225,60,191,177,100,64,151,83,179,189,222,188,170,95,83,235,26,97,109,216,247,217,247,232)
|
||||
IMAGE_DATA(255,158,83,238,43,84,230,213,181,107,95,87,130,239,193,234,213,125,159,57,243,105,85,119,97,97,65,233,191,135,227,164)
|
||||
IMAGE_DATA(234,207,171,249,249,27,85,61,93,223,29,67,108,252,117,223,186,190,153,131,59,134,24,191,182,111,211,86,56,6,204,63)
|
||||
IMAGE_DATA(183,111,155,35,206,1,235,187,157,35,60,6,154,57,38,124,12,117,223,39,79,126,164,92,62,243,163,113,224,99,104,57)
|
||||
IMAGE_DATA(193,237,183,215,225,123,234,190,245,53,151,93,120,29,190,103,46,24,171,91,223,191,14,221,147,94,78,232,100,144,90,78)
|
||||
IMAGE_DATA(159,62,61,163,39,165,95,83,235,26,225,109,204,204,181,19,159,25,165,45,40,64,224,250,243,234,234,213,175,212,165,75)
|
||||
IMAGE_DATA(215,193,0,196,235,233,82,155,127,229,202,77,117,251,246,55,96,128,208,245,231,213,197,139,95,86,245,116,253,235,215,111)
|
||||
IMAGE_DATA(143,198,16,31,255,169,217,179,103,63,175,234,235,58,186,174,61,134,56,191,186,111,221,134,153,135,63,6,220,63,183,239)
|
||||
IMAGE_DATA(94,239,228,12,52,134,216,188,235,190,195,100,96,143,1,99,62,238,100,0,143,33,63,25,156,63,127,173,186,166,95,161)
|
||||
IMAGE_DATA(100,96,174,195,247,76,55,25,196,118,6,179,231,206,157,83,144,244,53,162,217,170,222,251,179,239,168,239,238,221,84,107)
|
||||
IMAGE_DATA(234,142,35,253,158,190,134,180,51,107,215,123,174,238,6,245,205,123,166,29,187,13,221,166,221,231,23,55,62,54,247,84)
|
||||
IMAGE_DATA(210,127,215,239,217,99,105,198,49,234,187,190,118,183,146,63,7,211,103,123,207,157,209,24,220,190,239,130,175,80,125,51)
|
||||
IMAGE_DATA(6,45,187,111,87,245,92,222,125,239,140,53,254,246,26,167,190,59,151,187,130,250,208,184,101,245,241,190,221,250,216,248)
|
||||
IMAGE_DATA(180,119,212,216,76,44,65,99,124,238,189,66,99,51,49,132,141,161,238,159,236,27,140,223,86,126,60,192,241,91,224,249)
|
||||
IMAGE_DATA(73,126,126,63,60,223,211,127,14,79,185,112,225,130,74,209,180,199,125,24,75,42,235,99,79,210,203,184,153,31,123,17)
|
||||
IMAGE_DATA(22,9,167,125,181,105,169,223,104,67,237,141,180,222,104,173,210,191,195,37,72,235,216,139,176,196,56,188,80,219,67,109)
|
||||
IMAGE_DATA(89,26,84,162,61,128,249,215,122,214,104,85,237,14,245,186,250,64,205,249,64,237,52,218,110,248,135,30,236,59,30,240)
|
||||
IMAGE_DATA(159,1,159,255,174,122,218,104,229,181,240,129,230,190,219,104,39,226,193,128,225,129,148,127,237,193,142,250,231,72,250,128)
|
||||
IMAGE_DATA(205,231,229,144,132,214,193,72,187,128,15,148,7,62,255,126,214,51,96,60,168,245,247,145,240,1,230,190,231,201,246,129)
|
||||
IMAGE_DATA(242,64,146,135,242,249,215,90,62,148,30,224,49,191,223,136,227,65,155,139,248,207,128,191,14,24,254,107,201,252,183,17)
|
||||
IMAGE_DATA(15,186,234,3,52,206,87,67,50,175,70,236,247,17,31,40,15,224,60,52,254,103,96,185,241,224,73,165,174,123,0,179)
|
||||
IMAGE_DATA(127,1,8,243,1,247,64,254,12,148,203,65,219,35,15,150,58,235,1,206,253,160,81,232,3,230,1,253,12,248,235,128)
|
||||
IMAGE_DATA(255,121,96,156,252,107,15,32,31,186,197,254,32,34,200,131,189,168,7,220,28,4,237,131,114,215,0,159,255,150,250,171)
|
||||
IMAGE_DATA(19,30,208,236,95,122,226,122,64,63,3,189,230,203,13,142,168,103,32,151,255,180,61,192,217,215,188,255,243,20,250,224)
|
||||
IMAGE_DATA(175,7,240,51,32,225,77,137,147,131,164,252,183,212,227,169,120,192,99,255,202,19,238,1,244,12,148,226,30,250,80,150)
|
||||
IMAGE_DATA(255,164,61,128,215,218,150,63,204,222,247,128,230,143,177,163,215,128,190,208,7,106,13,144,241,223,82,127,78,196,3,122)
|
||||
IMAGE_DATA(159,3,177,55,127,48,15,194,28,4,177,146,173,193,27,108,15,56,159,1,184,252,7,99,246,0,254,92,69,197,190,255)
|
||||
IMAGE_DATA(135,122,6,106,254,33,247,148,61,80,187,255,225,121,80,142,255,64,45,142,205,3,255,44,161,52,127,159,203,203,228,61)
|
||||
IMAGE_DATA(168,187,255,228,123,80,134,191,239,65,105,246,33,255,252,252,3,49,73,255,12,16,238,255,121,30,140,135,127,174,7,240)
|
||||
IMAGE_DATA(25,230,126,227,129,255,57,87,190,254,66,44,210,62,131,209,103,16,50,254,242,245,215,230,63,80,143,138,121,0,159,31)
|
||||
IMAGE_DATA(227,252,165,251,207,124,254,188,51,160,24,127,173,212,253,39,196,127,160,30,102,243,135,99,191,245,32,204,65,242,207,95)
|
||||
IMAGE_DATA(113,254,216,25,144,252,12,110,154,252,83,60,176,235,30,52,231,147,248,51,96,123,192,59,127,160,88,196,207,224,186,202)
|
||||
IMAGE_DATA(255,209,136,255,102,198,51,224,178,223,5,248,115,60,160,207,223,36,252,75,157,191,241,60,72,225,191,8,242,223,84,15)
|
||||
IMAGE_DATA(146,60,8,249,67,30,236,35,30,240,206,159,227,252,203,159,63,151,227,223,178,47,205,223,101,191,3,240,199,60,192,124)
|
||||
IMAGE_DATA(128,191,127,137,177,24,199,247,47,233,252,151,26,133,177,15,241,223,180,248,75,61,8,249,199,60,112,125,104,189,104,5)
|
||||
IMAGE_DATA(125,255,200,227,95,246,251,71,62,127,247,251,71,217,218,155,206,223,95,179,221,223,229,196,60,8,125,160,190,247,141,177)
|
||||
IMAGE_DATA(208,42,253,253,123,156,127,137,189,15,205,159,242,192,190,71,207,251,160,146,207,63,230,1,79,124,254,229,126,127,50,89)
|
||||
IMAGE_DATA(254,15,26,253,81,41,133,127,204,131,52,31,218,239,218,101,252,243,127,127,53,30,254,248,218,43,225,239,178,55,115,134)
|
||||
IMAGE_DATA(60,136,249,64,203,254,221,91,156,127,217,223,31,242,248,195,185,159,187,246,98,252,251,234,119,210,3,152,63,215,131,93)
|
||||
IMAGE_DATA(139,171,235,135,255,190,95,47,206,190,220,239,111,39,151,123,92,254,125,49,255,1,211,3,200,7,174,218,54,98,236,75)
|
||||
IMAGE_DATA(252,254,124,178,185,95,198,223,126,95,207,207,204,25,242,0,247,129,227,5,84,103,219,105,91,206,254,112,228,158,90,191)
|
||||
IMAGE_DATA(129,30,248,252,113,15,184,62,112,68,113,47,193,126,242,185,167,36,127,215,3,252,89,104,125,224,120,177,13,112,135,99)
|
||||
IMAGE_DATA(30,103,79,237,119,114,98,127,188,185,135,207,191,239,205,27,243,0,246,130,47,168,45,104,159,227,178,15,115,62,149,119)
|
||||
IMAGE_DATA(242,99,191,100,238,225,243,167,60,192,124,224,120,129,213,27,20,100,47,201,59,165,206,251,211,249,187,236,55,188,249,110)
|
||||
IMAGE_DATA(38,250,192,21,197,93,194,30,255,157,109,94,236,151,205,61,90,27,234,215,224,60,194,200,228,85,185,15,92,63,194,58)
|
||||
IMAGE_DATA(124,238,18,246,227,139,253,156,220,211,31,178,167,249,175,19,30,64,62,80,94,224,130,153,251,220,227,236,169,156,79,197)
|
||||
IMAGE_DATA(62,135,125,110,236,167,243,247,61,224,250,208,250,1,139,170,19,114,159,12,251,156,216,79,203,61,60,254,235,214,220,49)
|
||||
IMAGE_DATA(15,98,62,112,4,181,185,225,244,45,205,57,113,246,101,99,95,154,123,54,212,125,130,191,137,45,202,7,204,11,202,151)
|
||||
IMAGE_DATA(216,253,126,188,83,49,79,179,199,248,67,236,39,25,251,50,254,190,7,152,15,28,47,104,230,52,119,44,223,228,178,231)
|
||||
IMAGE_DATA(236,247,115,98,31,207,61,20,255,122,94,107,108,31,96,63,226,130,218,160,185,167,179,231,229,157,114,177,31,203,61,113)
|
||||
IMAGE_DATA(254,181,246,162,62,224,126,240,132,181,231,246,235,114,199,217,235,223,209,202,216,115,242,78,249,216,167,249,63,11,230,27)
|
||||
IMAGE_DATA(250,64,121,145,170,176,15,154,123,58,123,105,222,129,247,251,233,177,191,161,126,137,240,15,61,192,125,200,241,2,110,15)
|
||||
IMAGE_DATA(234,219,231,14,253,91,26,121,236,169,188,83,54,246,121,252,113,31,194,245,33,95,97,126,231,197,60,159,189,52,231,115)
|
||||
IMAGE_DATA(242,78,74,236,199,248,175,54,242,231,141,121,145,230,7,206,27,98,238,199,124,248,111,200,148,97,159,187,230,242,98,159)
|
||||
IMAGE_DATA(226,111,230,71,251,64,121,145,42,172,31,138,123,200,158,247,249,150,155,243,57,121,135,183,223,183,249,175,123,252,253,51)
|
||||
IMAGE_DATA(208,122,94,190,15,148,23,41,126,80,109,173,178,184,27,81,231,58,52,123,105,206,231,172,185,178,216,135,206,255,221,121)
|
||||
IMAGE_DATA(174,38,120,145,34,136,57,205,221,252,255,42,225,89,114,42,123,40,231,167,229,29,73,236,135,252,87,128,121,83,94,164)
|
||||
IMAGE_DATA(248,177,42,96,14,115,183,217,251,103,249,165,217,99,121,7,94,115,241,216,95,87,63,51,249,175,16,62,60,245,120,97)
|
||||
IMAGE_DATA(158,192,130,234,226,253,172,160,236,225,216,135,62,91,241,216,99,235,45,111,191,67,239,247,77,236,203,249,199,124,160,61)
|
||||
IMAGE_DATA(145,177,230,115,55,121,190,229,191,92,128,189,52,231,83,121,7,142,125,140,191,239,129,153,35,236,5,215,15,137,224,126)
|
||||
IMAGE_DATA(66,230,238,222,198,230,79,113,135,247,57,41,236,169,253,14,157,119,40,246,24,127,91,184,23,82,79,232,118,96,230,254)
|
||||
IMAGE_DATA(158,178,206,53,134,63,47,230,203,176,231,231,157,251,78,222,145,241,55,115,132,89,196,189,144,137,207,188,93,95,91,246)
|
||||
IMAGE_DATA(79,138,179,79,207,249,120,236,175,171,123,36,127,220,3,218,11,174,55,220,250,48,115,127,95,3,241,199,242,77,73,246)
|
||||
IMAGE_DATA(105,57,63,22,251,48,255,101,130,5,151,101,25,230,208,218,218,242,95,202,136,249,92,246,84,206,151,197,190,207,191,245)
|
||||
IMAGE_DATA(192,8,99,196,241,71,82,119,89,81,220,113,254,210,152,207,103,143,229,124,42,239,80,252,125,15,204,220,125,38,114,63)
|
||||
IMAGE_DATA(248,188,41,230,97,158,137,197,124,105,246,242,188,195,141,125,152,191,61,239,229,136,31,233,218,142,50,231,112,135,99,62)
|
||||
IMAGE_DATA(198,126,179,56,123,55,246,165,252,105,15,96,63,242,132,181,15,51,143,115,167,98,190,251,236,67,254,102,222,20,167,146)
|
||||
IMAGE_DATA(130,153,135,249,29,231,158,150,111,82,217,195,57,63,135,63,238,129,175,113,177,166,152,75,185,79,154,125,94,236,67,252)
|
||||
IMAGE_DATA(105,15,74,139,203,92,202,29,203,55,227,103,159,194,223,247,192,231,177,93,105,92,172,41,230,143,193,223,58,80,220,241)
|
||||
IMAGE_DATA(152,31,15,251,117,245,83,54,123,232,25,160,89,149,18,204,220,196,57,196,222,245,0,227,14,199,60,126,166,144,202,190)
|
||||
IMAGE_DATA(76,236,227,30,248,92,74,115,134,243,75,140,125,235,65,137,152,239,6,123,200,3,30,183,28,185,204,7,141,56,236,141)
|
||||
IMAGE_DATA(120,49,95,158,125,169,188,67,241,175,61,176,25,149,225,12,49,183,115,186,156,63,28,243,97,190,25,15,251,146,252,227)
|
||||
IMAGE_DATA(30,164,107,128,240,246,37,227,159,27,243,221,98,143,121,208,242,241,57,198,132,115,198,246,49,114,254,20,119,89,204,119)
|
||||
IMAGE_DATA(129,125,220,131,18,242,247,141,169,252,185,49,127,184,216,227,30,60,42,194,24,218,183,219,251,24,9,123,89,204,99,249)
|
||||
IMAGE_DATA(166,123,236,105,15,114,229,242,134,246,49,49,246,113,238,220,152,239,46,123,220,131,135,81,182,182,96,206,212,190,29,247)
|
||||
IMAGE_DATA(64,206,61,45,223,116,133,61,230,65,156,169,140,53,180,143,161,115,140,148,59,63,223,116,141,189,41,254,152,106,31,98)
|
||||
IMAGE_DATA(60,57,146,48,79,231,30,198,124,60,223,116,133,189,41,249,30,132,172,211,152,75,185,83,49,127,56,216,155,2,141,179)
|
||||
IMAGE_DATA(246,1,103,139,243,150,50,231,112,207,143,249,174,178,183,11,199,131,62,139,51,143,185,156,251,209,137,121,172,96,177,195)
|
||||
IMAGE_DATA(99,77,241,198,152,167,112,63,58,49,143,21,108,62,174,23,20,235,60,230,28,238,212,24,167,205,175,84,161,125,192,121)
|
||||
IMAGE_DATA(243,153,31,115,231,20,106,206,90,33,107,25,243,24,247,88,255,211,230,51,169,18,227,224,122,146,198,92,210,199,180,121)
|
||||
IMAGE_DATA(76,179,72,56,149,212,180,231,221,197,114,204,188,123,229,40,179,254,31,240,28,99,244,0,0,0,0,0,0,0,0,0)
|
||||
IMAGE_DATA(120,156,237,156,187,111,92,69,20,198,87,252,5,17,53,18,169,83,165,164,115,26,36,42,72,227,34,5,82,170,20,84)
|
||||
IMAGE_DATA(41,83,197,46,35,72,67,129,132,40,80,26,164,40,82,232,136,210,32,89,72,8,81,145,136,64,120,36,49,193,49,56)
|
||||
IMAGE_DATA(78,236,181,215,15,236,56,97,216,185,247,206,222,121,156,115,230,156,153,217,221,107,227,137,62,109,216,123,231,245,251,206)
|
||||
IMAGE_DATA(61,51,59,187,228,155,19,189,19,61,53,215,67,203,235,239,247,126,120,99,174,167,108,233,247,240,26,94,189,143,135,90)
|
||||
IMAGE_DATA(24,234,251,70,11,205,123,68,59,85,93,191,158,175,166,29,191,141,81,221,91,64,157,203,77,223,230,218,173,176,141,106)
|
||||
IMAGE_DATA(204,88,191,195,107,223,45,46,168,183,62,125,179,109,99,161,126,223,233,27,27,243,240,62,93,130,54,154,49,56,125,95)
|
||||
IMAGE_DATA(118,153,87,186,92,215,119,218,88,104,199,80,201,235,139,42,75,253,69,53,26,111,169,250,25,227,207,229,151,235,95,137)
|
||||
IMAGE_DATA(248,201,141,223,18,207,15,216,14,231,249,141,37,3,186,156,154,237,245,230,85,253,154,90,215,8,107,195,190,207,190,71)
|
||||
IMAGE_DATA(255,247,156,114,95,161,50,175,174,93,251,170,18,124,15,86,175,238,251,204,153,79,170,186,11,11,11,74,255,61,28,39)
|
||||
IMAGE_DATA(85,127,94,205,207,223,168,234,233,250,238,24,98,227,175,251,214,245,205,28,220,49,196,248,181,125,155,182,194,49,96,254)
|
||||
IMAGE_DATA(185,125,219,28,113,14,88,223,237,28,225,49,208,204,49,225,99,168,251,62,121,242,67,229,242,153,31,141,3,31,67,203)
|
||||
IMAGE_DATA(9,110,191,189,14,223,83,247,173,175,185,236,194,235,240,61,115,193,88,221,250,254,117,232,158,244,114,66,39,131,212,114)
|
||||
IMAGE_DATA(250,244,233,25,61,41,253,154,90,215,8,111,99,102,174,157,248,204,40,109,65,1,2,215,159,87,87,175,126,169,46,93)
|
||||
IMAGE_DATA(186,14,6,32,94,79,151,218,252,43,87,110,170,219,183,191,6,3,132,174,63,175,46,94,252,162,170,167,235,95,191,126)
|
||||
IMAGE_DATA(123,52,134,248,248,79,205,158,61,251,89,85,95,215,209,117,237,49,196,249,213,125,235,54,204,60,252,49,224,254,185,125)
|
||||
IMAGE_DATA(247,122,39,103,160,49,196,230,93,247,29,38,3,123,12,24,243,113,39,3,120,12,249,201,224,252,249,107,213,53,253,10)
|
||||
IMAGE_DATA(37,3,115,29,190,103,186,201,224,181,200,206,96,246,220,185,115,10,146,190,70,180,91,213,123,111,246,109,245,237,189,155)
|
||||
IMAGE_DATA(106,77,221,113,164,223,211,215,144,118,102,237,122,207,213,221,160,190,121,207,180,99,183,161,219,180,251,252,252,198,71,230)
|
||||
IMAGE_DATA(158,74,250,239,250,61,123,44,205,56,70,125,215,215,238,86,242,231,96,250,108,239,185,51,26,131,219,247,93,240,21,170)
|
||||
IMAGE_DATA(111,198,160,101,247,237,170,158,203,59,239,158,177,198,223,94,227,212,119,231,114,87,80,31,26,183,172,62,222,183,91,31)
|
||||
IMAGE_DATA(27,159,246,142,26,155,137,37,104,140,207,189,87,104,108,38,134,176,49,212,253,147,125,131,241,219,202,143,7,56,126,11)
|
||||
IMAGE_DATA(60,63,201,207,239,7,231,123,250,207,225,41,23,46,92,80,41,154,246,184,15,99,73,101,125,236,73,122,25,55,243,99)
|
||||
IMAGE_DATA(47,194,34,225,180,175,54,45,109,52,234,171,189,145,214,27,173,85,250,103,184,4,105,29,123,17,150,24,135,23,106,123)
|
||||
IMAGE_DATA(168,45,75,131,74,180,7,48,255,90,207,26,173,170,221,161,254,175,62,80,115,62,80,59,141,182,27,254,161,7,251,142)
|
||||
IMAGE_DATA(7,252,103,192,231,191,171,158,54,90,249,95,248,64,115,223,109,180,19,241,96,192,240,64,202,191,246,96,71,253,125,36)
|
||||
IMAGE_DATA(125,192,230,243,114,72,66,235,96,164,93,192,7,202,3,159,255,70,214,51,96,60,168,245,215,145,240,1,230,190,231,201)
|
||||
IMAGE_DATA(246,129,242,64,146,135,242,249,215,90,62,148,30,224,49,191,223,136,227,65,155,139,248,207,128,191,14,24,254,107,201,252)
|
||||
IMAGE_DATA(183,17,15,186,234,3,52,206,87,67,50,175,70,236,247,17,31,40,15,224,60,52,254,103,96,185,241,224,73,165,174,123)
|
||||
IMAGE_DATA(0,179,127,1,8,243,1,247,64,254,12,148,203,65,219,35,15,150,58,235,1,206,253,160,81,232,3,230,1,253,12,248)
|
||||
IMAGE_DATA(235,128,255,121,96,156,252,107,15,32,31,186,197,254,32,34,200,131,189,168,7,220,28,4,237,131,114,215,0,159,255,150)
|
||||
IMAGE_DATA(250,179,19,30,208,236,95,122,226,122,64,63,3,189,230,203,13,142,168,103,32,151,255,180,61,192,217,215,188,255,245,20)
|
||||
IMAGE_DATA(250,224,175,7,240,51,32,225,77,137,147,131,164,252,183,212,227,169,120,192,99,255,202,19,238,1,244,12,148,226,30,250)
|
||||
IMAGE_DATA(80,150,255,164,61,128,215,218,150,63,204,222,247,128,230,143,177,163,215,128,13,161,15,212,26,32,227,191,165,254,152,136)
|
||||
IMAGE_DATA(7,244,62,7,98,111,254,96,30,132,57,8,98,37,91,131,251,108,15,56,159,1,184,252,7,99,246,0,254,92,69,197)
|
||||
IMAGE_DATA(190,255,135,122,6,106,254,33,247,148,61,80,187,255,225,121,80,142,255,64,45,142,205,3,255,44,161,52,127,159,203,203)
|
||||
IMAGE_DATA(228,61,168,187,255,228,123,80,134,191,239,65,105,246,33,255,252,252,3,49,73,255,12,16,238,255,121,30,140,135,127,174)
|
||||
IMAGE_DATA(7,240,25,230,126,227,129,255,57,87,190,254,66,44,210,62,131,209,103,16,50,254,242,245,215,230,63,80,143,138,121,0)
|
||||
IMAGE_DATA(159,31,227,252,165,251,207,124,254,188,51,160,24,127,173,212,253,39,196,127,160,30,102,243,135,99,191,245,32,204,65,242)
|
||||
IMAGE_DATA(207,95,113,254,216,25,144,252,12,110,154,252,83,60,176,235,30,52,231,147,248,51,96,123,192,59,127,160,88,196,207,224)
|
||||
IMAGE_DATA(186,202,255,209,136,255,102,198,51,224,178,223,5,248,115,60,160,207,223,36,252,75,157,191,241,60,72,225,191,8,242,223)
|
||||
IMAGE_DATA(84,15,146,60,8,249,67,30,236,35,30,240,206,159,227,252,203,159,63,151,227,223,178,47,205,223,101,191,3,240,199,60)
|
||||
IMAGE_DATA(192,124,128,191,127,137,177,24,199,247,47,233,252,151,26,133,177,15,241,223,180,248,75,61,8,249,199,60,112,125,104,189)
|
||||
IMAGE_DATA(104,5,125,255,200,227,95,246,251,71,62,127,247,251,71,217,218,155,206,223,95,179,221,223,229,196,60,8,125,160,190,247)
|
||||
IMAGE_DATA(141,177,208,42,253,253,123,156,127,137,189,15,205,159,242,192,190,71,207,251,160,146,207,63,230,1,79,124,254,229,126,127)
|
||||
IMAGE_DATA(50,89,254,15,26,253,94,41,133,127,204,131,52,31,218,239,218,101,252,243,127,127,53,30,254,248,218,43,225,239,178,55)
|
||||
IMAGE_DATA(115,134,60,136,249,64,203,254,221,91,156,127,217,223,31,242,248,195,185,159,187,246,98,252,55,212,111,164,7,48,127,174)
|
||||
IMAGE_DATA(7,187,22,87,215,15,255,125,191,94,156,125,185,223,223,78,46,247,184,252,55,196,252,7,76,15,32,31,184,106,219,136)
|
||||
IMAGE_DATA(177,47,241,251,243,201,230,126,25,127,251,125,61,63,51,103,200,3,220,7,142,23,80,157,109,167,109,57,251,195,145,123)
|
||||
IMAGE_DATA(106,253,10,122,224,243,199,61,224,250,192,17,197,189,4,251,201,231,158,146,252,93,15,240,103,161,245,129,227,197,54,192)
|
||||
IMAGE_DATA(29,142,121,156,61,181,223,201,137,253,241,230,30,62,255,13,111,222,152,7,176,23,124,65,109,65,251,28,151,125,152,243)
|
||||
IMAGE_DATA(169,188,147,31,251,37,115,15,159,63,229,1,230,3,199,11,172,222,160,32,123,73,222,41,117,222,159,206,223,101,223,247)
|
||||
IMAGE_DATA(230,187,153,232,3,87,20,119,9,123,252,119,182,121,177,95,54,247,104,245,213,47,193,121,132,145,201,171,114,31,184,126)
|
||||
IMAGE_DATA(132,117,248,220,37,236,199,23,251,57,185,103,99,200,158,230,191,78,120,0,249,64,121,129,11,102,238,115,143,179,167,114)
|
||||
IMAGE_DATA(62,21,251,28,246,185,177,159,206,223,247,128,235,67,235,7,44,170,78,200,125,50,236,115,98,63,45,247,240,248,175,91)
|
||||
IMAGE_DATA(115,199,60,136,249,192,17,212,102,223,233,91,154,115,226,236,203,198,190,52,247,244,213,125,130,191,137,45,202,7,204,11)
|
||||
IMAGE_DATA(202,151,216,253,126,188,83,49,79,179,199,248,67,236,39,25,251,50,254,190,7,152,15,28,47,104,230,52,119,44,223,228)
|
||||
IMAGE_DATA(178,231,236,247,115,98,31,207,61,20,255,122,94,107,108,31,96,63,226,130,218,160,185,167,179,231,229,157,114,177,31,203)
|
||||
IMAGE_DATA(61,113,254,181,246,162,62,224,126,240,132,181,231,246,235,114,199,217,235,223,209,202,216,115,242,78,249,216,167,249,63,11)
|
||||
IMAGE_DATA(230,27,250,64,121,145,170,176,15,154,123,58,123,105,222,129,247,251,233,177,223,87,63,71,248,135,30,224,62,228,120,1)
|
||||
IMAGE_DATA(183,7,245,237,115,135,254,45,141,60,246,84,222,41,27,251,60,254,184,15,225,250,144,175,48,191,243,98,158,207,94,154)
|
||||
IMAGE_DATA(243,57,121,39,37,246,99,252,87,27,249,243,198,188,72,243,3,231,13,49,247,99,62,252,55,100,202,176,207,93,115,121)
|
||||
IMAGE_DATA(177,79,241,55,243,163,125,160,188,72,21,214,15,197,61,100,207,251,124,203,205,249,156,188,195,219,239,219,252,215,61,254)
|
||||
IMAGE_DATA(254,25,104,61,47,223,7,202,139,20,63,168,182,86,89,220,141,168,115,29,154,189,52,231,115,214,92,89,236,67,231,255)
|
||||
IMAGE_DATA(238,60,87,19,188,72,17,196,156,230,110,254,127,149,240,44,57,149,61,148,243,211,242,142,36,246,67,254,43,192,188,41)
|
||||
IMAGE_DATA(47,82,252,88,21,48,135,185,219,236,253,179,252,210,236,177,188,3,175,185,120,236,175,171,159,152,252,87,8,31,158,122)
|
||||
IMAGE_DATA(188,48,79,96,65,117,241,126,86,80,246,112,236,67,159,173,120,236,177,245,150,183,223,161,247,251,38,246,229,252,99,62)
|
||||
IMAGE_DATA(208,158,200,88,243,185,155,60,223,242,95,46,192,94,154,243,169,188,3,199,62,198,223,247,192,204,17,246,130,235,135,68)
|
||||
IMAGE_DATA(112,63,33,115,119,111,99,243,167,184,195,251,156,20,246,212,126,135,206,59,20,123,140,191,45,220,11,169,39,116,59,48)
|
||||
IMAGE_DATA(115,127,79,89,231,26,195,159,23,243,101,216,243,243,206,125,39,239,200,248,155,57,194,44,226,94,200,196,103,222,174,175)
|
||||
IMAGE_DATA(45,251,39,197,217,167,231,124,60,246,215,213,61,146,63,238,1,237,5,215,27,110,125,152,185,191,175,129,248,99,249,166)
|
||||
IMAGE_DATA(36,251,180,156,31,139,125,152,255,50,193,130,203,178,12,115,104,109,109,249,47,101,196,124,46,123,42,231,203,98,223,231)
|
||||
IMAGE_DATA(223,122,96,132,49,226,248,35,169,187,172,40,238,56,127,105,204,231,179,199,114,62,149,119,40,254,190,7,102,238,62,19)
|
||||
IMAGE_DATA(185,31,124,222,20,243,48,207,196,98,190,52,123,121,222,225,198,62,204,223,158,247,114,196,143,116,109,71,153,115,184,195)
|
||||
IMAGE_DATA(49,31,99,191,89,156,189,27,251,82,254,180,7,176,31,121,194,218,135,153,199,185,83,49,223,125,246,33,127,51,111,138)
|
||||
IMAGE_DATA(83,73,193,204,195,252,142,115,79,203,55,169,236,225,156,159,195,31,247,192,215,184,88,83,204,165,220,39,205,62,47,246)
|
||||
IMAGE_DATA(33,254,180,7,165,197,101,46,229,142,229,155,241,179,79,225,239,123,224,243,216,174,52,46,214,20,243,199,224,111,29,40)
|
||||
IMAGE_DATA(238,120,204,143,135,253,186,250,49,155,61,244,12,208,172,74,9,102,110,226,28,98,239,122,128,113,135,99,30,63,83,72)
|
||||
IMAGE_DATA(101,95,38,246,113,15,124,46,165,57,195,249,37,198,190,245,160,68,204,119,131,61,228,1,143,91,142,92,230,131,70,28)
|
||||
IMAGE_DATA(246,70,188,152,47,207,190,84,222,161,248,215,30,216,140,202,112,134,152,219,57,93,206,31,142,249,48,223,140,135,125,73)
|
||||
IMAGE_DATA(254,113,15,210,53,64,120,251,146,241,207,141,249,110,177,199,60,104,249,248,28,99,194,57,99,251,24,57,127,138,187,44)
|
||||
IMAGE_DATA(230,187,192,62,238,65,9,249,251,198,84,254,220,152,63,92,236,113,15,30,21,97,12,237,219,237,125,140,132,189,44,230)
|
||||
IMAGE_DATA(177,124,211,61,246,180,7,185,114,121,67,251,152,24,251,56,119,110,204,119,151,61,238,193,195,40,91,91,48,103,106,223)
|
||||
IMAGE_DATA(142,123,32,231,158,150,111,186,194,30,243,32,206,84,198,26,218,199,208,57,70,202,157,159,111,186,198,222,20,127,76,181)
|
||||
IMAGE_DATA(15,49,158,28,73,152,167,115,15,99,62,158,111,186,194,222,148,124,15,66,214,105,204,165,220,169,152,63,28,236,77,129)
|
||||
IMAGE_DATA(198,89,251,128,179,197,121,75,153,115,184,231,199,124,87,217,219,133,227,193,6,139,51,143,185,156,251,209,137,121,172,96)
|
||||
IMAGE_DATA(177,195,99,77,241,198,152,167,112,63,58,49,143,21,108,62,174,23,20,235,60,230,28,238,212,24,167,205,175,84,161,125)
|
||||
IMAGE_DATA(192,121,243,153,31,115,231,20,106,206,90,33,107,25,243,24,247,88,255,211,230,51,169,18,227,224,122,146,198,92,210,199)
|
||||
IMAGE_DATA(180,121,76,179,72,56,149,212,180,231,221,197,114,204,188,123,229,40,179,254,15,24,110,99,246,0,0,0,0,0,0,0)
|
||||
IMAGE_END_DATA(2816, 5)
|
||||
|
||||
IMAGE_BEGIN_DATA
|
||||
|
|
|
|||
|
|
@ -129,6 +129,5 @@ file
|
|||
Info readonly separator,
|
||||
src.tpp,
|
||||
srcdoc.tpp,
|
||||
appdoc.tpp,
|
||||
Copying;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,14 +5,19 @@ namespace Upp {
|
|||
#define TFILE <CtrlLib/CtrlLib.t>
|
||||
#include <Core/t.h>
|
||||
|
||||
void CtrlSetDefaultSkin(void (*_skin)());
|
||||
void CtrlSetDefaultSkin(void (**_skin)());
|
||||
|
||||
extern Size (*extGetSmartTextSize)(const char *text, Font font, int cx);
|
||||
extern void (*extDrawSmartText)(Draw& draw, int x, int y, int cx, const char *text, Font font,
|
||||
Color ink, int accesskey, Color qtf_ink);
|
||||
|
||||
INITIALIZER(CtrlLib) {
|
||||
CtrlSetDefaultSkin(ChHostSkin);
|
||||
static void (*skin[3])() = {
|
||||
ChHostSkin,
|
||||
ChStdSkin,
|
||||
ChDarkSkin,
|
||||
};
|
||||
CtrlSetDefaultSkin(skin);
|
||||
|
||||
extGetSmartTextSize = GetSmartTextSize;
|
||||
|
||||
|
|
|
|||
|
|
@ -1531,13 +1531,13 @@ CH_STYLE(Calendar, Style, StyleDefault)
|
|||
|
||||
bgmain = SColorPaper;
|
||||
bgtoday = SColorPaper;
|
||||
bgselect = AdjustIfDark(Color(255, 254, 220));
|
||||
bgselect = AColor(255, 254, 220);
|
||||
|
||||
fgmain = SColorText;
|
||||
fgtoday = SBlack;
|
||||
fgselect = SBlack;
|
||||
|
||||
outofmonth = AdjustIfDark(Color(180, 180, 180));
|
||||
outofmonth = AColor(180, 180, 180);
|
||||
curdate = SWhite;
|
||||
today = SColorText;
|
||||
selecttoday = SColorMark;
|
||||
|
|
|
|||
|
|
@ -1449,6 +1449,11 @@ void FileSel::Activate()
|
|||
TopWindow::Activate();
|
||||
}
|
||||
|
||||
void FileSel::Skin()
|
||||
{
|
||||
Reload();
|
||||
}
|
||||
|
||||
bool FileSel::Key(dword key, int count) {
|
||||
switch(key) {
|
||||
case K_F9:
|
||||
|
|
|
|||
|
|
@ -175,6 +175,7 @@ class FileSel : public WithFileSelectorLayout<TopWindow> {
|
|||
public:
|
||||
virtual bool Key(dword key, int count);
|
||||
virtual void Activate();
|
||||
virtual void Skin();
|
||||
|
||||
private:
|
||||
SizeGrip sizegrip;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,127 +0,0 @@
|
|||
topic "About Callbacks and Bars";
|
||||
[l288;i1120;a17;O9;~~~.1408;2 $$1,0#10431211400427159095818037425705:param]
|
||||
[a83;*R6 $$2,5#31310162474203024125188417583966:caption]
|
||||
[b83;*4 $$3,5#07864147445237544204411237157677:title]
|
||||
[i288;O9;C2 $$4,6#40027414424643823182269349404212:item]
|
||||
[b42;a42;2 $$5,5#45413000475342174754091244180557:text]
|
||||
[l288;b17;a17;2 $$6,6#27521748481378242620020725143825:desc]
|
||||
[l321;t246;C@5;1 $$7,7#20902679421464641399138805415013:code]
|
||||
[b2503;2 $$8,0#65142375456100023862071332075487:separator]
|
||||
[*@(0.0.255)2 $$9,0#83433469410354161042741608181528:base]
|
||||
[t4167;C2 $$10,0#37138531426314131251341829483380:class]
|
||||
[l288;a17;*1 $$11,11#70004532496200323422659154056402:requirement]
|
||||
[i417;b42;a42;O9;~~~.416;2 $$12,12#10566046415157235020018451313112:tparam]
|
||||
[b167;C2 $$13,13#92430459443460461911108080531343:item1]
|
||||
[i288;a42;O9;C2 $$14,14#77422149456609303542238260500223:item2]
|
||||
[*@2$(0.128.128)2 $$15,15#34511555403152284025741354420178:NewsDate]
|
||||
[l321;*C$7;2 $$16,16#03451589433145915344929335295360:result]
|
||||
[l321;b83;a83;*C$7;2 $$17,17#07531550463529505371228428965313:result`-line]
|
||||
[l160;t4167;*C+117 $$18,5#88603949442205825958800053222425:package`-title]
|
||||
[2 $$19,0#53580023442335529039900623488521:gap]
|
||||
[t4167;C2 $$20,20#70211524482531209251820423858195:class`-nested]
|
||||
[b50;2 $$21,21#03324558446220344731010354752573:Par]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[{_}%EN-US
|
||||
[s2; About Callbacks and Bars&]
|
||||
[s0; This article discusses callback types and function overloads
|
||||
involved in Bar operations (MenuBar, ToolBar). The Bar class
|
||||
is a base class of BarCtrl which is a base class of MenuBar and
|
||||
ToolBar.&]
|
||||
[s0; &]
|
||||
[s0; The typical pattern you can see in U`+`+ code for handling Bars
|
||||
looks like this:&]
|
||||
[s0; &]
|
||||
[s7; void HelloWorld`::About()&]
|
||||
[s7; `{&]
|
||||
[s7; -|...&]
|
||||
[s7; `}&]
|
||||
[s7; &]
|
||||
[s7; void HelloWorld`::FileMenu(Bar`& bar)&]
|
||||
[s7; `{&]
|
||||
[s7; -|bar.Add(`"About..`", THISBACK(About));&]
|
||||
[s7; -|bar.Separator();&]
|
||||
[s7; -|bar.Add(`"Exit`", THISBACK(Close));&]
|
||||
[s7; `}&]
|
||||
[s7; &]
|
||||
[s7; void HelloWorld`::FileMenu2(Bar`& bar, int val)&]
|
||||
[s7; `{&]
|
||||
[s7; -|bar.Add(`"About..`", THISBACK(About));&]
|
||||
[s7; -|if (val `=`= 1)&]
|
||||
[s7; -|`{&]
|
||||
[s7; -|-|bar.Separator();&]
|
||||
[s7; -|-|bar.Add(`"Exit`", THISBACK(Close));&]
|
||||
[s7; -|`}&]
|
||||
[s7; `}&]
|
||||
[s7; &]
|
||||
[s7; HelloWorld`::HelloWorld()&]
|
||||
[s7; `{&]
|
||||
[s7; -|menu.Add(`"File`", THISBACK(FileMenu));&]
|
||||
[s7; -|menu.Add(`"File2`",THISBACK1(FileMenu2,0);&]
|
||||
[s0; &]
|
||||
[s0; Here THISBACK macro expands to &]
|
||||
[s0; &]
|
||||
[s0; -|[* callback](this, `&HelloWorld`::FileMenu)&]
|
||||
[s0; &]
|
||||
[s0; [* callback] is an overloaded non member template function which
|
||||
has overloads that allow the member function being called back
|
||||
to have none, 1,2,3 or 4 arguments. Hence the FileMenu function
|
||||
can have none, 1,2,3,or 4 parameters and the appropriate overload
|
||||
of [* callback] will be selected. When the target called back
|
||||
function is called (e.g. FileMenu), the actual arguments that
|
||||
are passed to it are provided by the event dispatcher which knows
|
||||
how many arguments it needs to pass for a particular event.
|
||||
In the example above, the HelloWorld constructor calls the [* callback
|
||||
]function which creates a Callback object (on the heap) containing
|
||||
the identity of the target function (FileMenu) to be called.
|
||||
The menu.Add function stores the address of the Callback object
|
||||
which will be used to call the FileMenu function when an event
|
||||
is triggered. There are several different Callback classes,
|
||||
including the Callback1MethodAction class, which is used for
|
||||
the above case. The Callback classes are functors and usually
|
||||
have a member function named Execute that is called by the event
|
||||
dispatching mechanism. For the Callback1MethodAction class,
|
||||
the Execute member function takes one parameter (provided by
|
||||
the event dispatcher) which is passed to the target callback
|
||||
function FileMenu.&]
|
||||
[s0; &]
|
||||
[s0; There is also a THISBACK1 macro, which allows specification
|
||||
of an additional value that is passed to the called back function
|
||||
(e.g. FileMenu2) when an event is triggered.&]
|
||||
[s0; &]
|
||||
[s0; The THISBACK1 macro in the above example expands to &]
|
||||
[s0; &]
|
||||
[s0; -|[* callback1](this, `&HelloWorld`::FileMenu2, 0)&]
|
||||
[s0; &]
|
||||
[s0; The FileMenu2 function takes two parameters, the first of which
|
||||
is supplied by the event dispatcher and the second comes from
|
||||
the additional value 0 specified in the invocation of THISBACK1.
|
||||
A possible use for this is to allow the target function to be
|
||||
called from multiple places., each of which identifies itself
|
||||
using the additional parameter. For the above example, the Callback
|
||||
object involved is of type CallbackMethodActionArg1.and this
|
||||
object stores the additional value (0 in this case) to be passed
|
||||
to the FileMenu2 function when an event is triggered. If you
|
||||
use the THISBACK1 macro with a member function that takes only
|
||||
one argument then the Callback object is of type CallbackMethodActionArg.&]
|
||||
[s0; &]
|
||||
[s0; There is also a THISBACK2 macro which allows two additional
|
||||
arguments. The member function used with THISBACK, can have
|
||||
0,1,2,3 or 4 parameters. For THISBACK1, the member function
|
||||
must have at least one parameter and for THISBACK2 the member
|
||||
function can have 2,3 or 4 parameters.&]
|
||||
[s0; &]
|
||||
[s0; If the member function used in the THISBACK macros is overloaded
|
||||
(e.g. FileMenu(int)) then the code won`'t compile. In this case
|
||||
you have to use a forwarding member function that is not overloaded.
|
||||
(You can`'t supply argument types when you take the address of
|
||||
a member function. If the function is overloaded, the one that`'s
|
||||
chosen depends on the target, but in this case the target is
|
||||
also overloaded so it can`'t be resolved).&]
|
||||
[s0; &]
|
||||
[s0; In the above example, the Add member function of Bar is an overloaded
|
||||
function and which Add function that is used depends on the return
|
||||
value of the [* callback] function. For the FileMenu example above,
|
||||
the return type of the [* callback] function is Callback1<Bar`&>.
|
||||
(In U`+`+, Callback classes start with upper case C and callback
|
||||
functions have lower case c). &]
|
||||
[s0; ]]
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
TITLE("About rounding double values")
|
||||
COMPRESSED
|
||||
120,156,165,88,139,110,219,200,21,253,149,193,58,222,149,109,
|
||||
90,153,23,95,82,11,108,234,56,133,129,54,27,36,187,192,
|
||||
182,134,107,142,197,145,60,48,69,170,36,21,219,187,221,124,
|
||||
123,207,29,82,15,63,148,71,43,195,182,68,206,125,157,123,
|
||||
238,153,161,206,37,123,241,130,7,124,143,127,225,53,122,109,
|
||||
167,102,89,180,23,231,133,76,146,177,139,185,30,27,17,143,
|
||||
127,74,199,159,62,125,26,166,169,28,147,43,1,87,130,107,
|
||||
37,164,16,154,115,45,99,17,166,60,13,19,145,112,21,107,
|
||||
25,198,60,28,45,76,109,230,23,231,38,81,227,195,247,17,
|
||||
172,100,16,238,41,161,4,23,145,212,88,197,21,151,90,200,
|
||||
80,36,137,22,113,152,168,52,138,70,19,179,104,93,85,94,
|
||||
156,95,145,29,172,20,172,120,156,68,90,192,70,135,82,197,
|
||||
161,134,173,214,66,224,189,8,227,40,142,71,173,107,11,11,
|
||||
27,17,197,99,163,229,248,132,178,212,65,180,135,236,100,12,
|
||||
83,45,117,164,85,34,149,72,164,140,82,165,83,141,180,133,
|
||||
28,185,214,34,201,43,216,144,29,153,133,8,168,67,45,20,
|
||||
240,208,113,168,176,44,198,127,205,83,33,17,53,225,97,136,
|
||||
128,246,110,5,18,225,67,118,17,194,201,56,164,213,137,78,
|
||||
132,138,19,169,101,36,145,0,143,81,36,69,15,71,185,109,
|
||||
38,176,83,82,140,91,164,52,62,249,49,28,11,24,199,65,
|
||||
188,39,121,202,101,20,167,8,136,100,81,176,74,83,161,18,
|
||||
4,212,34,228,66,141,38,85,78,69,202,144,171,49,108,18,
|
||||
116,33,130,99,15,73,24,9,228,43,85,130,136,177,80,10,
|
||||
127,67,157,196,163,198,82,31,218,170,190,56,63,252,113,192,
|
||||
135,124,40,195,240,128,242,77,97,158,40,173,148,142,82,45,
|
||||
184,66,20,248,208,4,87,196,209,73,17,202,100,116,101,26,
|
||||
132,108,53,1,123,66,157,39,22,1,118,149,132,10,145,35,
|
||||
252,65,71,81,158,2,50,50,213,137,82,9,31,77,10,211,
|
||||
52,91,240,28,82,137,66,4,66,236,197,132,106,168,164,78,
|
||||
9,26,37,1,175,140,194,84,0,223,48,210,92,142,106,251,
|
||||
239,165,171,237,220,150,0,216,129,24,227,85,115,122,18,34,
|
||||
151,142,132,50,16,18,52,12,163,136,19,90,33,184,32,85,
|
||||
8,184,185,72,52,50,194,15,26,220,246,60,244,220,240,188,
|
||||
16,42,16,106,47,149,90,33,147,84,107,0,0,7,34,21,
|
||||
66,240,4,63,168,12,176,120,102,8,164,224,139,232,194,119,
|
||||
230,58,16,122,47,6,129,209,167,84,83,248,84,17,124,18,
|
||||
232,203,136,135,104,131,236,204,37,129,46,95,0,118,33,19,
|
||||
250,61,32,251,48,16,24,4,100,40,194,16,101,43,0,45,
|
||||
19,148,30,2,121,229,201,45,226,100,244,214,222,54,175,77,
|
||||
107,123,182,28,158,188,232,104,38,162,64,68,123,156,236,195,
|
||||
36,69,251,132,38,248,148,214,169,76,149,10,101,26,170,136,
|
||||
3,198,166,155,99,50,166,89,242,115,184,118,18,7,34,198,
|
||||
88,161,212,48,68,241,222,12,133,199,130,82,145,73,26,17,
|
||||
8,189,147,236,184,112,37,229,1,94,140,59,42,28,158,28,
|
||||
9,17,147,163,4,211,146,36,17,87,41,176,0,4,60,4,
|
||||
205,161,4,9,250,140,54,75,204,0,73,193,228,198,204,108,
|
||||
118,220,207,233,239,151,127,236,159,190,61,254,229,3,59,111,
|
||||
228,152,189,186,170,150,45,171,171,101,153,187,114,198,242,106,
|
||||
121,85,88,246,209,20,75,219,124,127,113,222,240,49,251,208,
|
||||
154,50,55,117,206,78,216,220,180,215,172,112,87,181,169,239,
|
||||
89,110,167,200,173,97,237,109,181,113,48,93,150,19,18,145,
|
||||
102,212,91,247,255,166,69,85,213,44,59,238,86,194,168,98,
|
||||
237,181,101,165,53,40,180,101,101,85,102,199,179,218,2,244,
|
||||
154,214,154,150,221,186,246,154,114,203,237,196,205,77,193,114,
|
||||
55,115,109,19,48,55,180,195,103,124,15,178,99,57,68,147,
|
||||
179,63,111,125,214,254,115,118,172,130,254,226,246,130,100,40,
|
||||
31,124,234,238,37,15,125,79,172,43,190,144,118,81,221,254,
|
||||
15,73,147,227,173,156,215,31,87,41,203,160,187,182,202,178,
|
||||
255,176,181,58,245,111,211,135,110,207,74,102,242,220,81,11,
|
||||
250,100,27,203,154,85,7,215,221,9,216,47,217,81,118,180,
|
||||
238,225,192,149,236,164,170,237,203,101,235,138,225,245,1,51,
|
||||
108,106,111,89,53,101,72,159,85,183,229,118,59,227,49,59,
|
||||
223,231,252,152,115,230,202,150,77,61,54,131,158,58,119,7,
|
||||
227,139,231,22,117,40,127,97,145,175,235,209,154,77,109,63,
|
||||
251,98,38,213,252,10,57,111,40,55,120,212,20,120,178,51,
|
||||
91,7,159,227,216,243,55,187,78,174,237,113,99,97,129,215,
|
||||
71,91,220,31,248,214,178,182,6,130,198,163,11,108,186,158,
|
||||
195,83,111,50,220,13,146,43,170,153,224,171,218,242,167,245,
|
||||
247,119,220,162,186,197,58,111,178,115,81,89,213,32,151,251,
|
||||
205,174,253,5,20,36,251,158,217,187,69,85,66,190,119,96,
|
||||
183,238,63,155,152,146,93,89,182,108,108,78,5,204,77,233,
|
||||
22,203,2,208,120,84,170,58,7,16,115,51,43,93,187,204,
|
||||
237,186,214,102,216,23,2,108,218,101,13,63,180,186,195,116,
|
||||
131,60,115,172,89,78,0,214,53,208,17,60,251,151,99,127,
|
||||
2,83,41,73,95,29,130,23,19,31,172,233,111,15,26,76,
|
||||
77,145,83,70,181,197,13,15,57,155,154,166,13,24,124,20,
|
||||
22,239,216,20,2,130,72,77,85,26,170,121,85,106,115,16,
|
||||
108,0,65,131,76,217,96,229,188,33,10,251,254,228,171,94,
|
||||
211,101,170,180,117,77,99,88,118,232,131,175,220,4,236,246,
|
||||
218,214,118,115,127,64,38,93,153,192,168,3,250,0,226,135,
|
||||
164,49,44,116,179,177,115,151,29,79,138,138,64,164,218,107,
|
||||
232,38,203,206,69,0,207,7,59,200,208,119,204,179,183,126,
|
||||
216,191,94,45,118,182,221,143,208,55,218,208,68,125,214,100,
|
||||
55,69,124,138,108,134,94,148,27,166,251,126,251,75,229,114,
|
||||
126,133,94,131,26,217,101,118,137,202,93,78,111,122,239,80,
|
||||
20,72,222,186,155,126,72,112,117,77,169,131,71,114,248,170,
|
||||
40,8,86,83,20,65,135,173,155,47,138,173,33,191,175,150,
|
||||
12,147,202,76,115,227,183,25,112,193,129,197,203,186,70,239,
|
||||
192,149,178,106,217,2,3,235,59,121,5,5,118,109,246,67,
|
||||
179,205,38,48,231,222,167,65,142,231,126,157,29,206,134,143,
|
||||
246,169,94,203,64,169,173,189,33,103,47,87,131,73,151,143,
|
||||
24,31,134,7,68,160,245,197,135,78,254,130,248,72,184,6,
|
||||
71,141,47,99,208,113,107,85,196,178,161,26,60,191,30,239,
|
||||
155,157,154,64,191,59,58,99,74,45,212,156,77,157,45,114,
|
||||
16,29,53,55,80,232,130,53,213,220,182,215,100,105,216,149,
|
||||
163,158,78,167,182,238,121,108,218,117,168,220,206,209,75,76,
|
||||
69,75,107,125,22,240,65,147,96,218,182,51,255,108,111,187,
|
||||
110,14,217,217,212,187,4,28,55,196,161,170,219,45,222,120,
|
||||
63,195,235,128,110,102,63,32,47,108,39,121,63,108,5,228,
|
||||
116,231,145,96,139,169,22,209,30,179,55,251,253,241,149,227,
|
||||
255,188,121,157,93,126,56,251,235,91,70,47,244,134,223,113,
|
||||
76,218,203,151,32,205,173,185,111,168,253,11,139,232,141,155,
|
||||
149,108,144,29,97,6,159,119,242,254,244,111,108,203,137,244,
|
||||
78,214,76,93,109,221,139,194,76,104,103,244,204,94,205,204,
|
||||
238,172,178,203,211,95,223,245,30,245,206,180,0,220,74,112,
|
||||
216,64,216,236,72,238,112,121,242,234,29,60,110,146,76,188,
|
||||
75,60,161,185,22,185,157,250,1,216,242,116,186,179,216,127,
|
||||
158,190,255,105,83,44,158,33,200,207,141,181,11,146,74,87,
|
||||
80,131,126,179,117,133,66,5,30,79,112,114,220,225,231,205,
|
||||
217,175,91,160,73,190,93,226,146,116,195,221,65,5,49,134,
|
||||
221,238,56,232,168,241,186,147,205,231,93,18,96,27,151,250,
|
||||
137,203,85,125,152,133,175,117,156,253,241,68,8,63,180,53,
|
||||
21,185,122,109,155,191,246,77,125,86,29,187,247,211,194,204,
|
||||
154,29,123,235,215,133,248,146,115,95,123,255,25,115,157,93,
|
||||
34,138,191,246,77,81,222,184,187,175,10,244,77,78,79,239,
|
||||
22,255,111,246,27,73,252,7,196,131,206,28,212,215,238,80,
|
||||
138,81,88,216,218,239,201,166,152,87,216,224,77,121,15,117,
|
||||
54,51,215,109,240,131,205,102,127,208,139,212,70,183,134,148,
|
||||
42,196,11,71,219,26,226,133,199,145,7,168,223,5,171,137,
|
||||
13,216,25,78,35,139,69,229,3,147,126,118,71,141,188,218,
|
||||
210,80,236,54,174,48,53,229,228,117,251,239,247,239,73,152,
|
||||
59,103,195,39,219,100,109,105,111,233,132,216,128,153,215,164,
|
||||
149,254,187,147,94,218,79,161,217,189,49,59,107,217,181,161,
|
||||
211,8,5,171,114,58,252,20,152,148,119,168,195,214,37,201,
|
||||
181,195,89,169,177,109,179,62,164,244,210,220,116,189,161,81,
|
||||
127,219,85,215,47,118,205,250,224,54,179,165,173,87,199,54,
|
||||
250,102,100,137,97,129,226,116,91,225,250,164,234,143,186,94,
|
||||
212,135,236,231,254,113,141,204,205,106,110,55,130,255,232,201,
|
||||
197,15,34,246,201,231,181,123,83,40,12,241,254,233,49,132,
|
||||
174,14,251,98,7,217,119,251,186,204,190,123,194,142,193,138,
|
||||
30,166,104,170,21,71,216,28,91,12,169,84,247,56,131,156,
|
||||
78,178,227,166,189,47,214,32,217,26,9,22,238,198,178,125,
|
||||
61,195,161,149,237,171,105,183,251,147,249,126,185,89,71,144,
|
||||
121,119,211,194,222,57,98,212,144,61,76,225,109,229,65,4,
|
||||
198,125,178,100,98,38,132,39,14,15,125,239,128,207,73,85,
|
||||
126,180,117,95,116,176,105,8,164,129,110,211,151,54,204,127,
|
||||
7,99,253,54,187,77,133,46,146,98,23,255,5,245,137,37,
|
||||
33,
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
topic "About Updater";
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[l288;i704;a17;O9;~~~.992;2 $$1,0#10431211400427159095818037425705:param]
|
||||
[a83;*R6 $$2,5#31310162474203024125188417583966:caption]
|
||||
[b83;*2 $$3,5#07864147445237544204411237157677:title]
|
||||
[i288;b167;a42;O9;C2 $$4,6#40027414424643823182269349404212:item]
|
||||
[b42;a42;2 $$5,5#45413000475342174754091244180557:text]
|
||||
[l288;a17;2 $$6,6#27521748481378242620020725143825:desc]
|
||||
[l321;t246;C@5;1 $$7,7#20902679421464641399138805415013:code]
|
||||
[b2503;2 $$8,0#65142375456100023862071332075487:separator]
|
||||
[*@(0.0.255)2 $$9,0#83433469410354161042741608181528:base]
|
||||
[t4167;C2 $$10,0#37138531426314131251341829483380:class]
|
||||
[l288;a17;*1 $$11,11#70004532496200323422659154056402:requirement]
|
||||
[i417;b42;a42;O9;~~~.416;2 $$12,12#10566046415157235020018451313112:tparam]
|
||||
[b167;C2 $$13,13#92430459443460461911108080531343:item1]
|
||||
[i288;a42;O9;C2 $$14,14#77422149456609303542238260500223:item2]
|
||||
[*@2$(0.128.128)2 $$15,15#34511555403152284025741354420178:NewsDate]
|
||||
[l321;*C$7;2 $$16,16#03451589433145915344929335295360:result]
|
||||
[l321;b83;a83;*C$7;2 $$17,17#07531550463529505371228428965313:result`-line]
|
||||
[l160;t4167;*C+117 $$18,5#88603949442205825958800053222425:package`-title]
|
||||
[{_}%EN-US
|
||||
[s2; About Updater&]
|
||||
[s0; Updater.exe and related CtrlLib routines can save a lot of maintainance
|
||||
costs when deploying new application versions at large client`'s
|
||||
side.&]
|
||||
[s0; &]
|
||||
[s0; The ideas is this: New version is placed to the network drive.
|
||||
When user starts his local application, it checks network directory
|
||||
for the new version. If there is any, application starts updater
|
||||
and exits. Updater overwrites current version with new one and
|
||||
restarts it. Note that the need for updater is caused by fact
|
||||
that .exe cannot overwrite itself.&]
|
||||
[s0; &]
|
||||
[s0; See CtrlLib/Update for details.&]
|
||||
[s0; &]
|
||||
[s0; Now the funny part is that it can update even more than itself
|
||||
`- it is used to update any files in app directory. So updater.exe
|
||||
itself is updated by application. Last development has gone even
|
||||
so far, that Oracle client installation is `"updated`", that
|
||||
in fact means that deploying our Oracle apps can be done by copying
|
||||
two files to clients directory `- app itself and `"q.ini`" file,
|
||||
which basically contains information about network directory
|
||||
in UPDATE`=[/ path ]entry.&]
|
||||
[s0; &]
|
||||
[s0; Example `- this is how some of our app GUI`_APP`_MAIN looks
|
||||
like:&]
|
||||
[s0; &]
|
||||
[s7; GUI`_APP`_MAIN&]
|
||||
[s7; `{&]
|
||||
[s7; -|SelfUpdate(); // SelfUpdate updates updater.exe first and then
|
||||
app itself&]
|
||||
[s7; -|UpdateFile(`"cs`-cz.scd`"); // Update czech spelling checker&]
|
||||
[s7; -|UpdateFile(`"logo.bmp`"); // Update company logo to be used
|
||||
in reports&]
|
||||
[s0; &]
|
||||
[s0; &]
|
||||
[s0; ]
|
||||
|
|
@ -422,6 +422,8 @@ void ChFinish()
|
|||
sChStyle()[i].init();
|
||||
sIsDarkColorFace = IsDark(SColorFace());
|
||||
sLabelTextColorMismatch = IsDark(SColorText()) != IsDark(SColorLabel());
|
||||
for(int i = 0; i < 5; i++) // repeat to propagate changes
|
||||
SColor::Refresh();
|
||||
}
|
||||
|
||||
Value sChOp(Draw& w, const Rect& r, const Value& v, int op, Color ink)
|
||||
|
|
|
|||
|
|
@ -46,15 +46,11 @@ bool IsDarkColorFace();
|
|||
|
||||
template <class T>
|
||||
struct ChStyle {
|
||||
byte status;
|
||||
byte registered;
|
||||
T *standard;
|
||||
byte status = 0; // 0 - has to be initialised or written, 1 - initialised, 2 - was written
|
||||
byte registered = 0; // 0 - not yet registered
|
||||
|
||||
const T& Standard() const { return *standard; }
|
||||
T& Write() const { T& x = *(T *)this; x.status = 2; ChInvalidate(); return x; }
|
||||
void Assign(const T& src) { *(T *)this = src; }
|
||||
|
||||
ChStyle() { status = 0; registered = 0; standard = NULL; }
|
||||
};
|
||||
|
||||
#define CH_STYLE(klass, type, style) \
|
||||
|
|
@ -69,20 +65,17 @@ void COMBINE5(klass, __, type, __, style)::InitIt() { \
|
|||
\
|
||||
const klass::type& klass::style() \
|
||||
{ \
|
||||
static COMBINE5(klass, __, type, __, style) b, standard; \
|
||||
static COMBINE5(klass, __, type, __, style) b; \
|
||||
if(b.status == 0) { \
|
||||
ChRegisterStyle__(b.status, b.registered, COMBINE5(klass, __, type, __, style)::InitIt); \
|
||||
b.Init(); \
|
||||
b.status = 1; \
|
||||
standard = b; \
|
||||
standard.standard = b.standard = &standard; \
|
||||
} \
|
||||
return b; \
|
||||
} \
|
||||
\
|
||||
void COMBINE5(klass, __, type, __, style)::Init()
|
||||
|
||||
|
||||
// CH_VAR0 allows inserting action into _Write (missing ending '}')
|
||||
#define CH_VAR0(chtype, type, name, init) \
|
||||
chtype& COMBINE(ch_var__, name)(); \
|
||||
|
|
@ -105,7 +98,7 @@ void COMBINE(name, _Write)(type v) { COMBINE(ch_var__, name)().Write().value = v
|
|||
|
||||
#define CH_VAR(chtype, type, name, init) CH_VAR0(chtype, type, name, init) }
|
||||
|
||||
struct ChColor : ChStyle<ChColor> { Color value; };
|
||||
struct ChColor : ChStyle<ChColor> { SColor value; };
|
||||
#define CH_COLOR(name, init) CH_VAR(ChColor, Color, name, init)
|
||||
|
||||
struct ChInt : ChStyle<ChInt> { int value; };
|
||||
|
|
|
|||
|
|
@ -323,6 +323,14 @@ String Image::ToString() const
|
|||
return String("Image ").Cat() << GetSize();
|
||||
}
|
||||
|
||||
void Image::Data::NewSerial()
|
||||
{
|
||||
INTERLOCKED {
|
||||
static int64 gserial;
|
||||
serial = ++gserial;
|
||||
}
|
||||
}
|
||||
|
||||
Image::Data::Data(ImageBuffer& b)
|
||||
: buffer(b)
|
||||
{
|
||||
|
|
@ -330,10 +338,7 @@ Image::Data::Data(ImageBuffer& b)
|
|||
paintonly = false;
|
||||
refcount = 1;
|
||||
aux_data = 0;
|
||||
INTERLOCKED {
|
||||
static int64 gserial;
|
||||
serial = ++gserial;
|
||||
}
|
||||
NewSerial();
|
||||
}
|
||||
|
||||
void Image::SetAuxData(uint64 adata)
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ private:
|
|||
uint64 aux_data;
|
||||
int paintcount;
|
||||
|
||||
void NewSerial();
|
||||
void Retain() { AtomicInc(refcount); }
|
||||
void Release() { if(AtomicDec(refcount) == 0) delete this; }
|
||||
|
||||
|
|
@ -178,6 +179,7 @@ private:
|
|||
friend struct scImageMaker;
|
||||
|
||||
void SetAuxData(uint64 data);
|
||||
friend void iml_ReplaceAll(Image& tgt, Image& src);
|
||||
|
||||
public:
|
||||
Size GetSize() const { return data ? data->buffer.GetSize() : Size(0, 0); }
|
||||
|
|
@ -313,6 +315,7 @@ class Iml {
|
|||
|
||||
public:
|
||||
void Reset();
|
||||
void Skin();
|
||||
int GetCount() const { return map.GetCount(); }
|
||||
String GetId(int i) const { return map.GetKey(i); }
|
||||
Image Get(int i);
|
||||
|
|
@ -330,6 +333,7 @@ public:
|
|||
void GlobalFlag(dword f) { global_flags |= f; }
|
||||
|
||||
static void ResetAll(); // clears all .iml caches
|
||||
static void SkinAll(); // reskins all .iml caches
|
||||
};
|
||||
|
||||
void Register(const char *imageclass, Iml& iml);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,16 @@ Vector<ImageIml> UnpackImlData(const String& d)
|
|||
return UnpackImlData(~d, d.GetLength());
|
||||
}
|
||||
|
||||
void iml_ReplaceAll(Image& tgt, Image& src)
|
||||
{ // this very special function replaces all unmodified instances of Image with new content
|
||||
if(tgt.GetSize() == src.GetSize() && tgt.data) {
|
||||
tgt.data->buffer = src.data->buffer;
|
||||
tgt.data->NewSerial();
|
||||
}
|
||||
else
|
||||
tgt = src;
|
||||
}
|
||||
|
||||
void Iml::Init(int n)
|
||||
{
|
||||
for(int i = 0; i < n; i++)
|
||||
|
|
@ -53,11 +63,23 @@ void Iml::Reset()
|
|||
m.loaded = false;
|
||||
}
|
||||
|
||||
void Iml::Skin()
|
||||
{
|
||||
for(int i = 0; i < map.GetCount(); i++)
|
||||
if(map[i].loaded) {
|
||||
map[i].loaded = false;
|
||||
Get(i);
|
||||
}
|
||||
}
|
||||
|
||||
static StaticMutex sImlLock;
|
||||
|
||||
void Iml::Set(int i, const Image& img)
|
||||
{ // TODO: MT
|
||||
map[i].image = img;
|
||||
Image h = img; // make sure h has refcount 1, basically 'clone'
|
||||
ImageBuffer ib = h;
|
||||
h = ib;
|
||||
iml_ReplaceAll(map[i].image, h);
|
||||
map[i].loaded = true;
|
||||
}
|
||||
|
||||
|
|
@ -67,7 +89,8 @@ Image Iml::Get(int i)
|
|||
if(!m.loaded) {
|
||||
Mutex::Lock __(sImlLock);
|
||||
if(!m.loaded) {
|
||||
m.image = MakeImlImage(GetId(i), [&](int mode, const String& id) { return GetRaw(mode, id); }, global_flags);
|
||||
Image h = MakeImlImage(GetId(i), [&](int mode, const String& id) { return GetRaw(mode, id); }, global_flags);
|
||||
iml_ReplaceAll(m.image, h);
|
||||
m.loaded = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -180,6 +203,12 @@ void Iml::ResetAll()
|
|||
GetIml(i).Reset();
|
||||
}
|
||||
|
||||
void Iml::SkinAll()
|
||||
{
|
||||
for(int i = 0; i < GetImlCount(); i++)
|
||||
GetIml(i).Skin();
|
||||
}
|
||||
|
||||
static StaticCriticalSection sImgMapLock;
|
||||
|
||||
static VectorMap<String, Iml *>& sImgMap()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ struct scImageMaker : ValueMaker {
|
|||
StringBuffer s;
|
||||
s.Cat(typeid(*m).name());
|
||||
RawCat(s, paintonly);
|
||||
RawCat(s, IsDarkTheme());
|
||||
s.Cat(m->Key());
|
||||
return String(s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,13 @@ CH_COLOR(SLtMagenta, AdjustIfDark(LtMagenta()));
|
|||
CH_COLOR(SLtCyan, AdjustIfDark(LtCyan()));
|
||||
|
||||
bool dark_theme__;
|
||||
extern bool AColor_dark_mode__;
|
||||
|
||||
#define CH_END } // to avoid } highlighting problem
|
||||
|
||||
CH_VAR0(ChColor, Color, SColorPaper, White())
|
||||
dark_theme__ = IsDark(SColorPaper());
|
||||
Iml::ResetAll();
|
||||
AColor_dark_mode__ = dark_theme__ = IsDark(SColorPaper());
|
||||
Iml::SkinAll();
|
||||
CH_END
|
||||
|
||||
CH_COLOR(SColorFace, SLtGray());
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ performance in certain contexts. Default is false.&]
|
|||
ge][*@(0.0.255) `&][* _][*@3 img][* )]&]
|
||||
[s5;:ImageBuffer`:`:operator`=`(ImageBuffer`&`): [*@(0.0.255) void][* _operator`=(][*_^ImageBuffer^ I
|
||||
mageBuffer][*@(0.0.255) `&][* _][*@3 img][* )]&]
|
||||
[s2;%% Assigns pixels of [%-*@3 img] to ImageBuffer. [%-*@3 img] is cleared
|
||||
[s2;%% Moves pixels of [%-*@3 img] to ImageBuffer. [%-*@3 img] is cleared
|
||||
and empty after this operation, price paid for low`-cost constant
|
||||
time operation.&]
|
||||
[s3; &]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
topic "Supporting UHD displays and Dark theme";
|
||||
[l288;i1120;a17;O9;~~~.1408;2 $$1,0#10431211400427159095818037425705:param]
|
||||
[a83;*R6 $$2,5#31310162474203024125188417583966:caption]
|
||||
[H4;b83;*4 $$3,5#07864147445237544204411237157677:title]
|
||||
[H4;b83;m`.;N1;*4 $$3,5#07864147445237544204411237157677:title]
|
||||
[i288;O9;C2 $$4,6#40027414424643823182269349404212:item]
|
||||
[b42;a42;ph2 $$5,5#45413000475342174754091244180557:text]
|
||||
[l288;b17;a17;2 $$6,6#27521748481378242620020725143825:desc]
|
||||
|
|
@ -34,7 +34,7 @@ adjustment]&]
|
|||
[s0; [^topic`:`/`/Draw`/srcdoc`/UhdAndDarkTheme`_en`-us`#4^ 4. Iml
|
||||
files]&]
|
||||
[s0; &]
|
||||
[s3;:1: 1. GUI mode detection&]
|
||||
[s3;:1: GUI mode detection&]
|
||||
[s5; UHD mode is activated when standard GUI font is larger than
|
||||
24 pixels. Dark theme mode is activated if [* IsDark]([* SColorPaper]()),
|
||||
which means that grayscale value of default background is less
|
||||
|
|
@ -44,7 +44,7 @@ with dark theme, UHD resolution with light theme, UHD resolution
|
|||
with dark theme.&]
|
||||
[s5; [* IsUHDMode() ]and [* IsDarkTheme() ]functions return respective
|
||||
current GUI status.&]
|
||||
[s3;:2: 2. Scaling GUI for actual GUI font and UHD resolution&]
|
||||
[s3;:2: Scaling GUI for actual GUI font and UHD resolution&]
|
||||
[s5; U`+`+ coordinates in drawing operations are always in real pixels
|
||||
for screen targets. U`+`+ provides various functions to adjust
|
||||
GUI elements metrics to host platform font size and UHD mode.
|
||||
|
|
@ -82,7 +82,7 @@ by 2, otherwise returns it unchanged.]
|
|||
:: [s5; Returns [* b] if UHD is active, [* a] otherwise.]}}&]
|
||||
[s5; Usually [* DPI ]functions are used if the value is Image related,
|
||||
`'Z`' functions if it is text size related.&]
|
||||
[s3;:3: 3. Color adjustment&]
|
||||
[s3;:3: Color adjustment&]
|
||||
[s5; If application is specifying any colors, these colors need to
|
||||
be adjusted for dark theme. This can be often done by using [^topic`:`/`/Draw`/src`/Colors`_en`-us^ p
|
||||
redefined colors]. Sometimes only the light theme color is available
|
||||
|
|
@ -90,7 +90,7 @@ that needs to be converted to the dark theme `- this can be done
|
|||
using [* DarkTheme ]function. Alternatively [* AdjustIfDark] converts
|
||||
the color with [* DarkTheme] only if dark theme mode is currently
|
||||
active.&]
|
||||
[s3;:4: 4. Iml files&]
|
||||
[s3;:4: Iml files&]
|
||||
[s5; Iml files most often contain images that are used in GUI interface.
|
||||
Obviously, these images must be usually different for any of
|
||||
4 GUI modes.&]
|
||||
|
|
@ -138,4 +138,47 @@ macros:&]
|
|||
[s7; #define [* FIXED`_SIZE]&]
|
||||
[s7; &]
|
||||
[s7; #include <Draw/iml`_source.h>&]
|
||||
[s0; ]]
|
||||
[s0; &]
|
||||
[s3;:4: Reacting to theme changes&]
|
||||
[s5; Before 2025.1 U`+`+ release, the application skin was loaded
|
||||
from host platform just once at the start of execution and any
|
||||
if user changed host platform theme, this was not reflected in
|
||||
the application. Also changing to user defined or some predefined
|
||||
skin required restart of application to work properly.&]
|
||||
[s5; Since 2025.1, application can be made to react to host platform
|
||||
changes and can change skins without restart with a call to Ctrl`::SkinChangeSensi
|
||||
tive() (e.g. in GUI`_APP`_MAIN). However, this poses development
|
||||
challenges with switching between light theme and dark theme.&]
|
||||
[s5; While application can easily react in Paint to current mode,
|
||||
situation is much more complicated when colors or images are
|
||||
used as attributes of widgets or widget contents. For example
|
||||
ArrayCtrl`::EvenRowColor can be called by developer to define
|
||||
some color that is appropriate for light theme, theme but when
|
||||
the theme is switched can be no longer viable.&]
|
||||
[s5; U`+`+ provides several tools to handle this problem:&]
|
||||
[s5;i150;O0; All .iml images are now considered `"special logical
|
||||
constants`" whose appearance changes according to current theme
|
||||
(dark / light) `- this applies to all copies as well.&]
|
||||
[s5;i150;O0; [^topic`:`/`/Draw`/src`/Colors`_en`-us^ Predefined colors]
|
||||
constants are also `"special logical constants`" that are interpreted
|
||||
differently after theme switch.&]
|
||||
[s5;i150;O0; Special logical type of Color `- SColor `- that is defined
|
||||
by function that is reevaluated after theme switch, e.g.&]
|
||||
[s7; static SColor light`_highlight(`[`] `{ return Blend(SColorHighlight(),
|
||||
SColorPaper()) `});&]
|
||||
[s0; &]
|
||||
[s5;i150;O0; Another special logical type of Color `- AColor `- which
|
||||
should be defined as light theme color value, but when in dark
|
||||
theme, adjusts its value to the dark theme (with DarkThemeCached
|
||||
function)&]
|
||||
[s5;i150;O0; RichText / QTF can use DarkThemeCached to adjust colors,
|
||||
which is automatically done e.g. in Labels or RichTextCtrl when
|
||||
rendered on dark backgrounds&]
|
||||
[s5;i150;O0; If everything else fails, Ctrl`::Skin virtual function
|
||||
is always called on widget opening and on theme changes giving
|
||||
developer chance to alter colors are required&]
|
||||
[s5; To simplify testing, in debug mode Ctrl `+ Num`[`*`] toggles
|
||||
quickly between light and dark theme `- that way developer can
|
||||
check whether colors adjust correctly to the situation.&]
|
||||
[s5; Demonstration of these features is in reference/ThemeChangeSensitive
|
||||
example.]]
|
||||
|
|
@ -608,6 +608,18 @@ void StdIndexEntryDlg(String& s)
|
|||
EditText(s, t_("Index Entry"), t_("Index entry"), CharFilterAscii128, 1000);
|
||||
}
|
||||
|
||||
void RichEdit::Skin()
|
||||
{
|
||||
adjustunits.Image(RichEditImg::AdjustUnits());
|
||||
ink.ColorImage(RichEditImg::InkColor())
|
||||
.NullImage(RichEditImg::NullInkColor())
|
||||
.StaticImage(RichEditImg::ColorA());
|
||||
paper.ColorImage(RichEditImg::PaperColor())
|
||||
.NullImage(RichEditImg::NullPaperColor())
|
||||
.StaticImage(RichEditImg::ColorA());
|
||||
DoRefreshBar();
|
||||
}
|
||||
|
||||
RichEdit::RichEdit()
|
||||
{
|
||||
floating_zoom = Null;
|
||||
|
|
@ -651,7 +663,6 @@ RichEdit::RichEdit()
|
|||
Layout();
|
||||
SetSb();
|
||||
|
||||
adjustunits.Image(RichEditImg::AdjustUnits());
|
||||
adjustunits <<= THISBACK(SetupUnits);
|
||||
ruler.Add(adjustunits.RightPosZ(4, 16).VSizePosZ(2, 2));
|
||||
|
||||
|
|
@ -710,13 +721,7 @@ RichEdit::RichEdit()
|
|||
|
||||
gototable.WhenSelect = THISBACK(Goto);
|
||||
|
||||
ink.ColorImage(RichEditImg::InkColor())
|
||||
.NullImage(RichEditImg::NullInkColor())
|
||||
.StaticImage(RichEditImg::ColorA());
|
||||
ink.NotNull();
|
||||
paper.ColorImage(RichEditImg::PaperColor())
|
||||
.NullImage(RichEditImg::NullPaperColor())
|
||||
.StaticImage(RichEditImg::ColorA());
|
||||
ink <<= THISBACK(SetInk);
|
||||
ink.Tip(t_("Text color"));
|
||||
paper <<= THISBACK(SetPaper);
|
||||
|
|
@ -768,6 +773,11 @@ void RichEditWithToolBar::RefreshBar()
|
|||
toolbar.Set(THISBACK(TheBar));
|
||||
}
|
||||
|
||||
void RichEditWithToolBar::Skin()
|
||||
{
|
||||
RefreshBar();
|
||||
}
|
||||
|
||||
void RichEdit::EvaluateFields()
|
||||
{
|
||||
WhenStartEvaluating();
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ public:
|
|||
virtual Point GetPreedit();
|
||||
virtual Font GetPreeditFont();
|
||||
virtual Rect GetCaret() const;
|
||||
virtual void Skin();
|
||||
|
||||
private:
|
||||
virtual int GetCharAt(int64 i) const { return GetChar((int)i); }
|
||||
|
|
@ -855,6 +856,10 @@ public:
|
|||
};
|
||||
|
||||
class RichEditWithToolBar : public RichEdit {
|
||||
public:
|
||||
virtual void Skin();
|
||||
|
||||
private:
|
||||
ToolBar toolbar;
|
||||
bool extended;
|
||||
void RefreshBar();
|
||||
|
|
|
|||
|
|
@ -175,10 +175,10 @@ FileTabs& FileTabs::operator<<(const FileTabs &src)
|
|||
FileTabs::FileTabs() :
|
||||
stackedicons(false),
|
||||
greyedicons(true),
|
||||
filecolor(SColorLabel),
|
||||
extcolor(IsDark(SColorFace()) ? Blend(White, LtBlue) : LtBlue)
|
||||
filecolor(SColorLabel)
|
||||
{
|
||||
|
||||
static SColor se([] { return IsDark(SColorFace()) ? Blend(White, LtBlue) : LtBlue; });
|
||||
extcolor = se;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ void Sentinel(Stream& s, const char *txt)
|
|||
|
||||
void Ide::Serialize(Stream& s)
|
||||
{
|
||||
int version = 30;
|
||||
int version = 31;
|
||||
Sentinel(s, "before 12341234");
|
||||
s.Magic(0x12341234);
|
||||
Sentinel(s, "after magic");
|
||||
|
|
@ -254,6 +254,8 @@ void Ide::Serialize(Stream& s)
|
|||
s % hilite_if_endif;
|
||||
s % hilite_bracket;
|
||||
s % hilite_ifdef;
|
||||
if(version >= 31)
|
||||
s % hl_custom;
|
||||
if(version >= 3)
|
||||
s % thousands_separator;
|
||||
if(version >= 5)
|
||||
|
|
@ -293,7 +295,8 @@ void Ide::Serialize(Stream& s)
|
|||
}
|
||||
s % editor.commentdp;
|
||||
s % bordercolumn;
|
||||
s % bordercolor;
|
||||
Color dummy_color;
|
||||
s % dummy_color;
|
||||
if(version >= 20)
|
||||
s % find_pick_sel % find_pick_text % deactivate_save;
|
||||
s % hydra1_threads;
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ void Gdb::Cpu()
|
|||
while(!ss.IsEof()) {
|
||||
String ln = ss.GetLine();
|
||||
cpu.Add(AttrText(ln).SetFont(Courier(Ctrl::HorzLayoutZoom(12)))
|
||||
.Paper(even ? Blend(SColorMark, SColorPaper, 220) : SColorPaper)
|
||||
.Paper(even ? SColorEvenRow() : SColorPaper())
|
||||
.Ink(SColorText));
|
||||
even = !even;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ EscValue EscColor(Color c)
|
|||
{
|
||||
EscValue v;
|
||||
if(c.GetSpecial() >= 0)
|
||||
c = AdjustIfDark(RealizeColor(c));
|
||||
c = AColor(RealizeColor(c));
|
||||
if(!IsNull(c)) {
|
||||
v.MapSet("r", c.GetR());
|
||||
v.MapSet("g", c.GetG());
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ bool RepoSync::ListSvn(const String& path)
|
|||
if(action == ADD && IsConflictFile(file)) {
|
||||
action = DELETEC;
|
||||
an = "Delete (conflict resolved)";
|
||||
color = AdjustIfDark(Black());
|
||||
color = AColor(Black());
|
||||
}
|
||||
else {
|
||||
static const char *as[] = {
|
||||
|
|
@ -182,7 +182,7 @@ bool RepoSync::ListSvn(const String& path)
|
|||
};
|
||||
static Color c[] = { LtBlue, Magenta, Green, LtRed, LtMagenta };
|
||||
an = as[action];
|
||||
color = AdjustIfDark(c[action]);
|
||||
color = AColor(c[action]);
|
||||
}
|
||||
}
|
||||
if(pass == action < 0 && action != DELETEC) {
|
||||
|
|
@ -238,7 +238,7 @@ bool RepoSync::ListGit(const String& path)
|
|||
};
|
||||
static Color c[] = { LtBlue, Magenta, Green, LtRed, LtMagenta };
|
||||
an = as[action];
|
||||
color = AdjustIfDark(c[action]);
|
||||
color = AColor(c[action]);
|
||||
}
|
||||
int ii = list.GetCount();
|
||||
list.Add(action, file, Null, AttrText(action < 0 ? h : file).Ink(color));
|
||||
|
|
@ -288,7 +288,7 @@ void RepoSync::SyncList()
|
|||
return cfg.Find(s) >= 0;
|
||||
};
|
||||
int hi = list.GetCount();
|
||||
Color bk = AdjustIfDark(LtYellow());
|
||||
Color bk = AColor(LtYellow());
|
||||
list.Add(REPOSITORY, path,
|
||||
AttrText().Paper(bk),
|
||||
AttrText(path).Bold().Paper(bk),
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ void Ide::UpdateFormat(CodeEditor& editor)
|
|||
editor.LineNumbers(line_numbers);
|
||||
editor.AutoEnclose(auto_enclose);
|
||||
editor.MarkLines(mark_lines);
|
||||
editor.BorderColumn(bordercolumn, bordercolor);
|
||||
editor.BorderColumn(bordercolumn, this->editor.GetHlStyle(CodeEditor::SHOW_BORDER).color);
|
||||
editor.PersistentFindReplace(persistent_find_replace);
|
||||
editor.FindReplaceRestorePos(find_replace_restore_pos);
|
||||
editor.Refresh();
|
||||
|
|
@ -381,6 +381,8 @@ void Ide::SetupFormat() {
|
|||
(hlt.thousands_separator, thousands_separator)
|
||||
(hlt.hline, hline)
|
||||
(hlt.vline, vline)
|
||||
(hlt.bordercolumn, bordercolumn)
|
||||
(hlt.hl_custom, hl_custom)
|
||||
|
||||
(edt.indent_spaces, indent_spaces)
|
||||
(edt.no_parenthesis_indent, no_parenthesis_indent)
|
||||
|
|
@ -390,8 +392,6 @@ void Ide::SetupFormat() {
|
|||
(edt.lineends, line_endings)
|
||||
(edt.numbers, line_numbers)
|
||||
(edt.bookmark_pos, bookmark_pos)
|
||||
(edt.bordercolumn, bordercolumn)
|
||||
(edt.bordercolor, bordercolor)
|
||||
(edt.findpicksel, find_pick_sel)
|
||||
(edt.findpicktext, find_pick_text)
|
||||
(edt.deactivate_save, deactivate_save)
|
||||
|
|
@ -457,6 +457,7 @@ void Ide::SetupFormat() {
|
|||
edt.tabsize.WhenAction = rtvr <<=
|
||||
hlt.hlstyle.WhenCtrlsAction = ed.WhenAction = tf.WhenAction =
|
||||
con.WhenAction = f1.WhenAction = f2.WhenAction = dlg.Breaker(222);
|
||||
hlt.hlstyle.WhenCtrlsAction << [&] { hlt.hl_custom <<= true; };
|
||||
ide.showtimeafter <<= Nvl((Date)FileGetTime(ConfigFile("version")), GetSysDate() - 1);
|
||||
hlt.hl_restore <<= dlg.Breaker(333);
|
||||
hlt.hl_restore_white <<= dlg.Breaker(334);
|
||||
|
|
@ -465,6 +466,8 @@ void Ide::SetupFormat() {
|
|||
for(auto sk : GetAllChSkins())
|
||||
ide.chstyle.Add(ide.chstyle.GetCount(), sk.b);
|
||||
|
||||
ide.chstyle << dlg.Breaker(336);
|
||||
|
||||
String usc_path = GetHomeDirFile("usc.path");
|
||||
ide.uscpath <<= LoadFile(usc_path);
|
||||
DirSelect(ide.uscpath, ide.uscpath_sel);
|
||||
|
|
@ -530,24 +533,33 @@ void Ide::SetupFormat() {
|
|||
SetupEditor();
|
||||
ReadHlStyles(hlt.hlstyle);
|
||||
hlstyle_is_default = true;
|
||||
hlt.hl_custom <<= true;
|
||||
}
|
||||
if(c == 334 && PromptYesNo("Set white theme?")) {
|
||||
editor.WhiteTheme(false);
|
||||
SetupEditor();
|
||||
ReadHlStyles(hlt.hlstyle);
|
||||
hlstyle_is_default = false;
|
||||
hlt.hl_custom <<= true;
|
||||
}
|
||||
if(c == 335 && PromptYesNo("Set dark theme?")) {
|
||||
editor.DarkTheme(false);
|
||||
SetupEditor();
|
||||
ReadHlStyles(hlt.hlstyle);
|
||||
hlstyle_is_default = false;
|
||||
hlt.hl_custom <<= true;
|
||||
}
|
||||
if(c == 336) {
|
||||
auto v = GetAllChSkins();
|
||||
Ctrl::SetSkin(v[clamp((int)~ide.chstyle, 0, v.GetCount() - 1)].a);
|
||||
}
|
||||
}
|
||||
FileSetTime(ConfigFile("version"), ToTime(~ide.showtimeafter));
|
||||
FinishConfig();
|
||||
SaveConfig();
|
||||
|
||||
auto v = GetAllChSkins();
|
||||
Ctrl::SetSkin(v[clamp(chstyle, 0, v.GetCount() - 1)].a);
|
||||
|
||||
if(HasLibClang()) {
|
||||
for(int cpp = 0; cpp < 2; cpp++) {
|
||||
|
|
|
|||
|
|
@ -14,13 +14,20 @@ struct UppHubNest : Moveable<UppHubNest> {
|
|||
String branch;
|
||||
};
|
||||
|
||||
static Color s_Make(Color c) { return Blend(SColorPaper(), c, IsDarkTheme() ? 60 : 20); }
|
||||
|
||||
Color StatusPaper(const String& status)
|
||||
{
|
||||
return Blend(SColorPaper(), decode(status, "broken", SLtRed(),
|
||||
"experimental", SLtYellow(),
|
||||
"stable", SLtGreen(),
|
||||
"rolling", SLtCyan(),
|
||||
SColorPaper()), IsDarkTheme() ? 60 : 20);
|
||||
static SColor broken([] { return s_Make(SLtRed()); });
|
||||
static SColor experimental([] { return s_Make(SLtYellow()); });
|
||||
static SColor stable([] { return s_Make(SLtGreen()); });
|
||||
static SColor rolling([] { return s_Make(SLtCyan()); });
|
||||
|
||||
return decode(status, "broken", broken,
|
||||
"experimental", experimental,
|
||||
"stable", stable,
|
||||
"rolling", rolling,
|
||||
SColorPaper());
|
||||
}
|
||||
|
||||
void VerifyUppHubRequirements()
|
||||
|
|
|
|||
|
|
@ -128,15 +128,15 @@ void WorkspaceWork::ScanWorkspace() {
|
|||
fnt.Bold();
|
||||
if(pi.italic)
|
||||
fnt.Italic();
|
||||
package.Add(pk, Null, fnt, Nvl(AdjustIfDark(pi.ink), SColorText()), false, 0, Null, SColorMark);
|
||||
package.Add(pk, Null, fnt, Nvl(AColor(pi.ink), SColorText()), false, 0, Null, SColorMark);
|
||||
}
|
||||
if(!organizer) {
|
||||
if(main.GetCount())
|
||||
package.Add(prjaux, IdeImg::PrjAux(), ListFont(), AdjustIfDark(Magenta));
|
||||
package.Add(ideaux, IdeImg::IdeAux(), ListFont(), AdjustIfDark(Magenta));
|
||||
package.Add(tempaux, IdeImg::TempAux(), ListFont(), AdjustIfDark(Magenta));
|
||||
package.Add(prjaux, IdeImg::PrjAux(), ListFont(), AColor(Magenta()));
|
||||
package.Add(ideaux, IdeImg::IdeAux(), ListFont(), AColor(Magenta()));
|
||||
package.Add(tempaux, IdeImg::TempAux(), ListFont(), AColor(Magenta()));
|
||||
if(main.GetCount())
|
||||
package.Add(METAPACKAGE, IdeImg::Meta(), ListFont(), AdjustIfDark(Red));
|
||||
package.Add(METAPACKAGE, IdeImg::Meta(), ListFont(), AColor(Red()));
|
||||
}
|
||||
package.SetCursor(0);
|
||||
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ public:
|
|||
virtual void DeactivateBy(Ctrl *new_focus);
|
||||
virtual void Activate();
|
||||
virtual void Layout();
|
||||
virtual void Skin();
|
||||
|
||||
virtual bool IsVerbose() const;
|
||||
virtual void PutConsole(const char *s);
|
||||
|
|
@ -640,7 +641,6 @@ public:
|
|||
bool deactivate_save;
|
||||
int insert_include;
|
||||
int bordercolumn;
|
||||
Color bordercolor;
|
||||
bool persistent_find_replace;
|
||||
bool find_replace_restore_pos;
|
||||
int spellcheck_comments;
|
||||
|
|
@ -672,6 +672,7 @@ public:
|
|||
byte hilite_scope;
|
||||
int hilite_bracket;
|
||||
int hilite_ifdef;
|
||||
bool hl_custom = false;
|
||||
bool barline;
|
||||
bool qtfsel;
|
||||
|
||||
|
|
|
|||
|
|
@ -530,22 +530,25 @@ LAYOUT(SetupFontLayout, 528, 312)
|
|||
ITEM(Upp::Button, defaults, SetLabel(t_("Restore defaults")).RightPosZ(8, 116).BottomPosZ(4, 24))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(SetupHlLayout, 544, 344)
|
||||
ITEM(Upp::ArrayCtrl, hlstyle, LeftPosZ(4, 360).VSizePosZ(4, 8))
|
||||
LAYOUT(SetupHlLayout, 544, 364)
|
||||
ITEM(Upp::ArrayCtrl, hlstyle, LeftPosZ(4, 360).VSizePosZ(4, 4))
|
||||
ITEM(Upp::Label, dv___1, SetLabel(t_("Scope highlighting")).LeftPosZ(372, 160).TopPosZ(4, 16))
|
||||
ITEM(Upp::Switch, hilite_scope, SetLabel(t_("None\n2 colors\n5 colors")).LeftPosZ(372, 188).TopPosZ(20, 20))
|
||||
ITEM(Upp::Label, dv___3, SetLabel(t_("Matching bracket highlighting")).LeftPosZ(372, 160).TopPosZ(52, 16))
|
||||
ITEM(Upp::Switch, hilite_bracket, SetLabel(t_("None\nNormal\nFlashing")).LeftPosZ(372, 180).TopPosZ(68, 20))
|
||||
ITEM(Upp::Label, dv___5, SetLabel(t_("#else/#elif/#endif info")).LeftPosZ(372, 160).TopPosZ(100, 16))
|
||||
ITEM(Upp::Switch, hilite_ifdef, SetLabel(t_("None\nNormal\nWith line number")).LeftPosZ(372, 196).TopPosZ(120, 60))
|
||||
ITEM(Upp::Option, hilite_if_endif, SetLabel(t_("#if/#endif tracing")).LeftPosZ(372, 160).TopPosZ(184, 18))
|
||||
ITEM(Upp::Option, thousands_separator, SetLabel(t_("Thousands separator")).LeftPosZ(372, 160).TopPosZ(204, 18))
|
||||
ITEM(Upp::Option, hline, SetLabel(t_("Line")).LeftPosZ(432, 160).TopPosZ(228, 18))
|
||||
ITEM(Upp::Option, vline, SetLabel(t_("Column")).LeftPosZ(472, 84).TopPosZ(228, 18))
|
||||
ITEM(Upp::Button, hl_restore, SetLabel(t_("Restore default colors")).HSizePosZ(368, 4).BottomPosZ(56, 20))
|
||||
ITEM(Upp::Button, hl_restore_dark, SetLabel(t_("Dark theme")).HSizePosZ(368, 4).BottomPosZ(8, 20))
|
||||
ITEM(Upp::Button, hl_restore_white, SetLabel(t_("White theme")).HSizePosZ(368, 4).BottomPosZ(32, 20))
|
||||
ITEM(Upp::Label, dv___14, SetLabel(t_("Current")).LeftPosZ(372, 40).TopPosZ(228, 18))
|
||||
ITEM(Upp::Option, hilite_if_endif, SetLabel(t_("#if/#endif tracing")).LeftPosZ(372, 160).TopPosZ(180, 18))
|
||||
ITEM(Upp::Option, thousands_separator, SetLabel(t_("Thousands separator")).LeftPosZ(372, 160).TopPosZ(200, 18))
|
||||
ITEM(Upp::Option, hline, SetLabel(t_("Line")).LeftPosZ(432, 160).TopPosZ(224, 18))
|
||||
ITEM(Upp::Option, vline, SetLabel(t_("Column")).LeftPosZ(472, 84).TopPosZ(224, 18))
|
||||
ITEM(Upp::Button, hl_restore, SetLabel(t_("Restore default colors")).HSizePosZ(368, 4).BottomPosZ(52, 20))
|
||||
ITEM(Upp::Button, hl_restore_dark, SetLabel(t_("Dark theme")).HSizePosZ(368, 4).BottomPosZ(4, 20))
|
||||
ITEM(Upp::Button, hl_restore_white, SetLabel(t_("White theme")).HSizePosZ(368, 4).BottomPosZ(28, 20))
|
||||
ITEM(Upp::Label, dv___14, SetLabel(t_("Current")).LeftPosZ(372, 40).TopPosZ(224, 18))
|
||||
ITEM(Upp::Option, hl_custom, SetLabel(t_("Custom colors")).LeftPosZ(372, 172).VSizePosZ(272, 76))
|
||||
ITEM(Upp::Label, dv___16, SetLabel(t_("Paint line at column")).HSizePosZ(372, 64).TopPosZ(248, 19))
|
||||
ITEM(Upp::EditIntSpin, bordercolumn, Min(0).LeftPosZ(484, 52).TopPosZ(248, 19))
|
||||
END_LAYOUT
|
||||
|
||||
LAYOUT(SetupEditorLayout, 544, 344)
|
||||
|
|
@ -553,37 +556,34 @@ LAYOUT(SetupEditorLayout, 544, 344)
|
|||
ITEM(Upp::EditIntSpin, tabsize, LeftPosZ(116, 52).TopPosZ(4, 19))
|
||||
ITEM(Upp::Label, dv___2, SetLabel(t_("Indent")).LeftPosZ(4, 108).TopPosZ(24, 19))
|
||||
ITEM(Upp::EditIntSpin, indent_amount, LeftPosZ(116, 52).TopPosZ(24, 19))
|
||||
ITEM(Upp::Label, dv___4, SetLabel(t_("Paint line at column")).HSizePosZ(4, 432).TopPosZ(44, 19))
|
||||
ITEM(Upp::EditIntSpin, bordercolumn, Min(0).LeftPosZ(116, 52).TopPosZ(44, 19))
|
||||
ITEM(Upp::ColorPusher, bordercolor, LeftPosZ(172, 48).TopPosZ(44, 20))
|
||||
ITEM(Upp::Label, dv___7, SetLabel(t_("Default charset")).LeftPosZ(4, 108).TopPosZ(64, 19))
|
||||
ITEM(Upp::DropList, charset, LeftPosZ(116, 104).TopPosZ(64, 19))
|
||||
ITEM(Upp::Label, dv___9, SetLabel(t_("Line endings")).LeftPosZ(4, 108).TopPosZ(84, 19))
|
||||
ITEM(Upp::DropList, lineends, LeftPosZ(116, 160).TopPosZ(84, 19))
|
||||
ITEM(Upp::Option, showtabs, SetLabel(t_("Show tabs and line endings")).LeftPosZ(4, 272).TopPosZ(108, 16))
|
||||
ITEM(Upp::Option, showspaces, SetLabel(t_("Show spaces")).LeftPosZ(4, 272).TopPosZ(124, 16))
|
||||
ITEM(Upp::Option, warnwhitespace, SetLabel(t_("Show possibly misplaced tabs and spaces")).LeftPosZ(4, 272).TopPosZ(140, 16))
|
||||
ITEM(Upp::Option, indent_spaces, SetLabel(t_("Indent using spaces")).HSizePosZ(4, 268).TopPosZ(156, 16))
|
||||
ITEM(Upp::Option, no_parenthesis_indent, SetLabel(t_("No indent after parenthesis")).LeftPosZ(4, 272).TopPosZ(172, 16))
|
||||
ITEM(Upp::Option, numbers, SetLabel(t_("Show line numbers")).LeftPosZ(4, 272).TopPosZ(188, 16))
|
||||
ITEM(Upp::Option, bookmark_pos, SetLabel(t_("Bookmarks restore position")).LeftPosZ(4, 272).TopPosZ(204, 16))
|
||||
ITEM(Upp::Option, findpicksel, SetLabel(t_("Find picks selection")).LeftPosZ(4, 272).TopPosZ(220, 16))
|
||||
ITEM(Upp::Option, findpicktext, SetLabel(t_("Find picks selection or text")).LeftPosZ(4, 272).TopPosZ(236, 16))
|
||||
ITEM(Upp::Option, deactivate_save, SetLabel(t_("Save file on TheIde window deactivation")).LeftPosZ(4, 272).TopPosZ(252, 16))
|
||||
ITEM(Upp::Option, persistent_find_replace, SetLabel(t_("Do not close Find/Replace dialog automatically")).LeftPosZ(4, 272).TopPosZ(268, 16))
|
||||
ITEM(Upp::Option, find_replace_restore_pos, SetLabel(t_("Restore position on canceling incremental search")).LeftPosZ(4, 272).TopPosZ(284, 16))
|
||||
ITEM(Upp::Option, block_caret, SetLabel(t_("Full block caret")).LeftPosZ(4, 272).TopPosZ(300, 16))
|
||||
ITEM(Upp::Option, bar_branch, SetLabel(t_("Show git branch in editor bar")).LeftPosZ(4, 372).TopPosZ(316, 16))
|
||||
ITEM(Upp::Label, dv___4, SetLabel(t_("Default charset")).LeftPosZ(4, 108).TopPosZ(44, 19))
|
||||
ITEM(Upp::DropList, charset, LeftPosZ(116, 104).TopPosZ(44, 19))
|
||||
ITEM(Upp::Label, dv___6, SetLabel(t_("Line endings")).LeftPosZ(4, 108).TopPosZ(64, 19))
|
||||
ITEM(Upp::DropList, lineends, LeftPosZ(116, 160).TopPosZ(64, 19))
|
||||
ITEM(Upp::Option, showtabs, SetLabel(t_("Show tabs and line endings")).LeftPosZ(4, 272).TopPosZ(88, 16))
|
||||
ITEM(Upp::Option, showspaces, SetLabel(t_("Show spaces")).LeftPosZ(4, 272).TopPosZ(104, 16))
|
||||
ITEM(Upp::Option, warnwhitespace, SetLabel(t_("Show possibly misplaced tabs and spaces")).LeftPosZ(4, 272).TopPosZ(120, 16))
|
||||
ITEM(Upp::Option, indent_spaces, SetLabel(t_("Indent using spaces")).HSizePosZ(4, 268).TopPosZ(136, 16))
|
||||
ITEM(Upp::Option, no_parenthesis_indent, SetLabel(t_("No indent after parenthesis")).LeftPosZ(4, 272).TopPosZ(152, 16))
|
||||
ITEM(Upp::Option, numbers, SetLabel(t_("Show line numbers")).LeftPosZ(4, 272).TopPosZ(168, 16))
|
||||
ITEM(Upp::Option, bookmark_pos, SetLabel(t_("Bookmarks restore position")).LeftPosZ(4, 272).TopPosZ(184, 16))
|
||||
ITEM(Upp::Option, findpicksel, SetLabel(t_("Find picks selection")).LeftPosZ(4, 272).TopPosZ(200, 16))
|
||||
ITEM(Upp::Option, findpicktext, SetLabel(t_("Find picks selection or text")).LeftPosZ(4, 272).TopPosZ(216, 16))
|
||||
ITEM(Upp::Option, deactivate_save, SetLabel(t_("Save file on TheIde window deactivation")).LeftPosZ(4, 272).TopPosZ(232, 16))
|
||||
ITEM(Upp::Option, persistent_find_replace, SetLabel(t_("Do not close Find/Replace dialog automatically")).LeftPosZ(4, 272).TopPosZ(248, 16))
|
||||
ITEM(Upp::Option, find_replace_restore_pos, SetLabel(t_("Restore position on canceling incremental search")).LeftPosZ(4, 272).TopPosZ(264, 16))
|
||||
ITEM(Upp::Option, block_caret, SetLabel(t_("Full block caret")).LeftPosZ(4, 272).TopPosZ(280, 16))
|
||||
ITEM(Upp::Option, bar_branch, SetLabel(t_("Show git branch in editor bar")).LeftPosZ(4, 272).TopPosZ(296, 16))
|
||||
ITEM(Upp::Option, wordwrap_comments, SetLabel(t_("Wordwrap comments")).LeftPosZ(304, 224).TopPosZ(140, 16))
|
||||
ITEM(Upp::Label, dv___26, SetLabel(t_("File Tabs")).LeftPosZ(304, 64).TopPosZ(4, 19))
|
||||
ITEM(Upp::Label, dv___23, SetLabel(t_("File Tabs")).LeftPosZ(304, 64).TopPosZ(4, 19))
|
||||
ITEM(Upp::DropList, filetabs, LeftPosZ(372, 64).TopPosZ(4, 19))
|
||||
ITEM(Upp::Label, dv___28, SetLabel(t_("Crosses")).LeftPosZ(304, 64).TopPosZ(24, 19))
|
||||
ITEM(Upp::Label, dv___25, SetLabel(t_("Crosses")).LeftPosZ(304, 64).TopPosZ(24, 19))
|
||||
ITEM(Upp::DropList, tabs_crosses, LeftPosZ(372, 64).TopPosZ(24, 19))
|
||||
ITEM(Upp::Option, tabs_icons, SetLabel(t_("Icons")).LeftPosZ(304, 132).TopPosZ(44, 16))
|
||||
ITEM(Upp::Option, tabs_grouping, SetLabel(t_("Group by file folders")).LeftPosZ(304, 132).TopPosZ(60, 16))
|
||||
ITEM(Upp::Option, tabs_stacking, SetLabel(t_("Stacking")).LeftPosZ(304, 132).TopPosZ(76, 16))
|
||||
ITEM(Upp::Option, tabs_serialize, SetLabel(t_("Persistent tabs")).LeftPosZ(304, 132).TopPosZ(92, 16))
|
||||
ITEM(Upp::Label, dv___34, SetLabel(t_("Spellcheck comments")).LeftPosZ(304, 120).TopPosZ(116, 19))
|
||||
ITEM(Upp::Label, dv___31, SetLabel(t_("Spellcheck comments")).LeftPosZ(304, 120).TopPosZ(116, 19))
|
||||
ITEM(Upp::DropList, spellcheck_comments, LeftPosZ(428, 92).TopPosZ(116, 19))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,16 @@
|
|||
#define IMAGEFILE <ide/ide.iml>
|
||||
#include <Draw/iml_source.h>
|
||||
|
||||
void Ide::Skin()
|
||||
{
|
||||
SetToolBar();
|
||||
ScanWorkspace();
|
||||
if(!hl_custom) {
|
||||
editor.DefaultHlStyles();
|
||||
UpdateFormat();
|
||||
}
|
||||
}
|
||||
|
||||
void Ide::ToggleVerboseBuild() {
|
||||
console.verbosebuild = !console.verbosebuild;
|
||||
|
||||
|
|
@ -569,7 +579,6 @@ Ide::Ide()
|
|||
editor.NoCutLine();
|
||||
|
||||
bordercolumn = 96;
|
||||
bordercolor = SColorFace();
|
||||
|
||||
state_icon = -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ void AppMain___()
|
|||
|
||||
Ctrl::SetUHDEnabled();
|
||||
Ctrl::SetDarkThemeEnabled();
|
||||
Ctrl::SkinChangeSensitive();
|
||||
Ctrl::SetAppName("TheIDE");
|
||||
|
||||
SetLanguage(LNG_ENGLISH);
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ GUI_APP_MAIN
|
|||
win.Add(edit.SizePos());
|
||||
win.Run();
|
||||
|
||||
DDUMP(AsCString(edit.GetQTF()));
|
||||
RDUMP(AsCString(edit.GetQTF()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ struct Sample : public Ctrl {
|
|||
|
||||
class TestChStyle : public WithTestChStyleLayout<TopWindow> {
|
||||
public:
|
||||
virtual void Skin();
|
||||
|
||||
typedef TestChStyle CLASSNAME;
|
||||
|
||||
ToolBar bar;
|
||||
|
|
|
|||
|
|
@ -1,61 +1,62 @@
|
|||
LAYOUT(TestChStyleLayout, 972, 492)
|
||||
ITEM(OptionBox, dv___0, SetLabel(t_("OptionBox")).LeftPosZ(12, 140).TopPosZ(324, 128))
|
||||
ITEM(EditString, readonly, SetEditable(false).LeftPosZ(20, 80).TopPosZ(52, 19))
|
||||
ITEM(DropList, dl_readonly, SetEditable(false).LeftPosZ(108, 96).TopPosZ(52, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_readonly, SetEditable(false).LeftPosZ(212, 96).TopPosZ(52, 19))
|
||||
ITEM(EditString, disabled, LeftPosZ(20, 80).TopPosZ(76, 19))
|
||||
ITEM(DropList, dl_disabled, LeftPosZ(108, 96).TopPosZ(76, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_disabled, LeftPosZ(212, 96).TopPosZ(76, 19))
|
||||
ITEM(EditString, normal1, LeftPosZ(20, 80).TopPosZ(28, 19))
|
||||
ITEM(DropList, dl_normal1, LeftPosZ(108, 96).TopPosZ(28, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_normal1, LeftPosZ(212, 96).TopPosZ(28, 19))
|
||||
ITEM(DropTime, dv___10, LeftPosZ(20, 120).TopPosZ(100, 19))
|
||||
ITEM(DropDate, dv___11, LeftPosZ(144, 104).TopPosZ(100, 19))
|
||||
ITEM(LabelBox, dv___12, SetLabel(t_("LabelBox")).LeftPosZ(316, 148).TopPosZ(24, 104))
|
||||
ITEM(Label, dv___13, SetLabel(t_("Label")).LeftPosZ(324, 40).TopPosZ(52, 19))
|
||||
ITEM(DropTime, tm_dis, LeftPosZ(20, 120).TopPosZ(124, 19))
|
||||
ITEM(DropDate, dt_dis, LeftPosZ(144, 104).TopPosZ(124, 19))
|
||||
ITEM(EditIntSpin, spin_sides, LeftPosZ(20, 64).TopPosZ(148, 19))
|
||||
ITEM(Option, dv___17, ThreeState(true).SetLabel(t_("Option")).LeftPosZ(92, 80).TopPosZ(148, 16))
|
||||
ITEM(EditIntSpin, dis1, LeftPosZ(20, 64).TopPosZ(172, 19))
|
||||
ITEM(Option, option1, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(168, 16))
|
||||
ITEM(Switch, dv___20, SetLabel(t_("One\nTwo")).LeftPosZ(176, 84).TopPosZ(148, 40))
|
||||
ITEM(Option, option2, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(188, 16))
|
||||
ITEM(EditIntSpin, dis2, LeftPosZ(20, 64).TopPosZ(196, 19))
|
||||
ITEM(Option, option3, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(208, 16))
|
||||
ITEM(Switch, switch1, SetLabel(t_("One\nTwo")).LeftPosZ(176, 84).TopPosZ(192, 40))
|
||||
ITEM(TabCtrl, tab, LeftPosZ(316, 150).TopPosZ(136, 100))
|
||||
ITEM(Label, dv___26, SetLabel(t_("This is label")).SetInk(Cyan).LeftPosZ(16, 168).TopPosZ(240, 19))
|
||||
ITEM(DropTime, dv___27, LeftPosZ(316, 120).TopPosZ(244, 19))
|
||||
ITEM(SliderCtrl, dv___28, LeftPosZ(16, 64).TopPosZ(272, 24))
|
||||
ITEM(Button, dis, SetLabel(t_("disabled")).LeftPosZ(88, 56).TopPosZ(272, 24))
|
||||
ITEM(ArrayCtrl, dv___30, LeftPosZ(260, 52).TopPosZ(188, 100))
|
||||
ITEM(ProgressIndicator, pi1, LeftPosZ(180, 192).TopPosZ(296, 12))
|
||||
ITEM(ProgressIndicator, pi2, LeftPosZ(180, 192).TopPosZ(312, 12))
|
||||
ITEM(ProgressIndicator, pi5, LeftPosZ(180, 192).TopPosZ(328, 24))
|
||||
ITEM(ProgressIndicator, pi3, LeftPosZ(380, 24).TopPosZ(296, 148))
|
||||
ITEM(ProgressIndicator, pi4, LeftPosZ(412, 24).TopPosZ(296, 148))
|
||||
ITEM(SliderCtrl, dv___36, LeftPosZ(180, 20).VCenterPosZ(80, 158))
|
||||
ITEM(Upp::OptionBox, dv___0, SetLabel(t_("OptionBox")).LeftPosZ(12, 140).TopPosZ(324, 128))
|
||||
ITEM(Upp::EditString, readonly, SetEditable(false).LeftPosZ(20, 80).TopPosZ(52, 19))
|
||||
ITEM(Upp::DropList, dl_readonly, SetEditable(false).LeftPosZ(108, 96).TopPosZ(52, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_readonly, SetEditable(false).LeftPosZ(212, 96).TopPosZ(52, 19))
|
||||
ITEM(Upp::EditString, disabled, LeftPosZ(20, 80).TopPosZ(76, 19))
|
||||
ITEM(Upp::DropList, dl_disabled, LeftPosZ(108, 96).TopPosZ(76, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_disabled, LeftPosZ(212, 96).TopPosZ(76, 19))
|
||||
ITEM(Upp::EditString, normal1, LeftPosZ(20, 80).TopPosZ(28, 19))
|
||||
ITEM(Upp::DropList, dl_normal1, LeftPosZ(108, 96).TopPosZ(28, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_normal1, LeftPosZ(212, 96).TopPosZ(28, 19))
|
||||
ITEM(Upp::DropTime, dv___10, LeftPosZ(20, 120).TopPosZ(100, 19))
|
||||
ITEM(Upp::DropDate, dv___11, LeftPosZ(144, 104).TopPosZ(100, 19))
|
||||
ITEM(Upp::LabelBox, dv___12, SetLabel(t_("LabelBox")).LeftPosZ(316, 148).TopPosZ(24, 104))
|
||||
ITEM(Upp::Label, dv___13, SetLabel(t_("Label")).LeftPosZ(324, 40).TopPosZ(52, 19))
|
||||
ITEM(Upp::DropTime, tm_dis, LeftPosZ(20, 120).TopPosZ(124, 19))
|
||||
ITEM(Upp::DropDate, dt_dis, LeftPosZ(144, 104).TopPosZ(124, 19))
|
||||
ITEM(Upp::EditIntSpin, spin_sides, LeftPosZ(20, 64).TopPosZ(148, 19))
|
||||
ITEM(Upp::Option, dv___17, ThreeState(true).SetLabel(t_("Option")).LeftPosZ(92, 80).TopPosZ(148, 16))
|
||||
ITEM(Upp::EditIntSpin, dis1, LeftPosZ(20, 64).TopPosZ(172, 19))
|
||||
ITEM(Upp::Option, option1, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(168, 16))
|
||||
ITEM(Upp::Switch, dv___20, SetLabel(t_("One\nTwo")).LeftPosZ(176, 84).TopPosZ(148, 40))
|
||||
ITEM(Upp::Option, option2, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(188, 16))
|
||||
ITEM(Upp::EditIntSpin, dis2, LeftPosZ(20, 64).TopPosZ(196, 19))
|
||||
ITEM(Upp::Option, option3, ThreeState(true).SetLabel(t_("Disabled")).LeftPosZ(92, 80).TopPosZ(208, 16))
|
||||
ITEM(Upp::Switch, switch1, SetLabel(t_("One\nTwo")).LeftPosZ(176, 84).TopPosZ(192, 40))
|
||||
ITEM(Upp::TabCtrl, tab, LeftPosZ(316, 150).TopPosZ(136, 100))
|
||||
ITEM(Upp::Label, dv___26, SetLabel(t_("This is label")).SetInk(Upp::Cyan).LeftPosZ(16, 168).TopPosZ(240, 19))
|
||||
ITEM(Upp::DropTime, dv___27, LeftPosZ(316, 120).TopPosZ(244, 19))
|
||||
ITEM(Upp::SliderCtrl, dv___28, LeftPosZ(16, 64).TopPosZ(272, 24))
|
||||
ITEM(Upp::Button, dis, SetLabel(t_("disabled")).LeftPosZ(88, 56).TopPosZ(272, 24))
|
||||
ITEM(Upp::ArrayCtrl, dv___30, LeftPosZ(260, 52).TopPosZ(188, 100))
|
||||
ITEM(Upp::ProgressIndicator, pi1, LeftPosZ(180, 192).TopPosZ(296, 12))
|
||||
ITEM(Upp::ProgressIndicator, pi2, LeftPosZ(180, 192).TopPosZ(312, 12))
|
||||
ITEM(Upp::ProgressIndicator, pi5, LeftPosZ(180, 192).TopPosZ(328, 24))
|
||||
ITEM(Upp::ProgressIndicator, pi3, LeftPosZ(380, 24).TopPosZ(296, 148))
|
||||
ITEM(Upp::ProgressIndicator, pi4, LeftPosZ(412, 24).TopPosZ(296, 148))
|
||||
ITEM(Upp::SliderCtrl, dv___36, LeftPosZ(180, 20).VCenterPosZ(80, 158))
|
||||
UNTYPED(sample, LeftPosZ(212, 160).TopPosZ(364, 80))
|
||||
ITEM(DropList, dl_empty, LeftPosZ(480, 96).TopPosZ(4, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_empty, LeftPosZ(480, 96).TopPosZ(28, 19))
|
||||
ITEM(DataPusher, dv___40, LeftPosZ(480, 152).TopPosZ(52, 24))
|
||||
ITEM(EditString, es_error, LeftPosZ(480, 164).TopPosZ(80, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_error, LeftPosZ(480, 96).TopPosZ(104, 19))
|
||||
ITEM(WithDropChoice<EditString>, dc_error2, LeftPosZ(580, 96).TopPosZ(104, 19))
|
||||
ITEM(EditIntSpin, dv___44, LeftPosZ(476, 64).TopPosZ(132, 56))
|
||||
ITEM(EditIntSpin, dv___45, LeftPosZ(552, 36).TopPosZ(132, 19))
|
||||
ITEM(EditString, normal, LeftPosZ(492, 180).TopPosZ(204, 48))
|
||||
ITEM(DropList, dl_normal, LeftPosZ(492, 180).TopPosZ(256, 44))
|
||||
ITEM(WithDropChoice<EditString>, dc_normal, LeftPosZ(492, 180).TopPosZ(304, 44))
|
||||
ITEM(ArrayCtrl, list, LeftPosZ(492, 176).TopPosZ(352, 136))
|
||||
ITEM(Button, ok, SetLabel(t_("OK")).LeftPosZ(304, 80).TopPosZ(464, 20))
|
||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).LeftPosZ(392, 80).TopPosZ(464, 20))
|
||||
ITEM(ColorPusher, color, LeftPosZ(152, 64).TopPosZ(264, 24))
|
||||
ITEM(DropTree, droptree, LeftPosZ(316, 120).TopPosZ(268, 19))
|
||||
ITEM(TreeCtrl, dv___54, LeftPosZ(696, 152).TopPosZ(12, 196))
|
||||
ITEM(RichTextView, dv___55, LeftPosZ(696, 152).TopPosZ(348, 136))
|
||||
ITEM(ColumnList, dv___56, LeftPosZ(696, 152).TopPosZ(212, 132))
|
||||
ITEM(DropList, skin, LeftPosZ(12, 164).TopPosZ(464, 19))
|
||||
ITEM(Upp::DropList, dl_empty, LeftPosZ(480, 96).TopPosZ(4, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_empty, LeftPosZ(480, 96).TopPosZ(28, 19))
|
||||
ITEM(Upp::DataPusher, dv___40, LeftPosZ(480, 152).TopPosZ(52, 24))
|
||||
ITEM(Upp::EditString, es_error, LeftPosZ(480, 164).TopPosZ(80, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_error, LeftPosZ(480, 96).TopPosZ(104, 19))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_error2, LeftPosZ(580, 96).TopPosZ(104, 19))
|
||||
ITEM(Upp::EditIntSpin, dv___44, LeftPosZ(476, 64).TopPosZ(132, 56))
|
||||
ITEM(Upp::EditIntSpin, dv___45, LeftPosZ(552, 36).TopPosZ(132, 19))
|
||||
ITEM(Upp::EditString, normal, LeftPosZ(492, 180).TopPosZ(204, 48))
|
||||
ITEM(Upp::DropList, dl_normal, LeftPosZ(492, 180).TopPosZ(256, 44))
|
||||
ITEM(Upp::WithDropChoice<Upp::EditString>, dc_normal, LeftPosZ(492, 180).TopPosZ(304, 44))
|
||||
ITEM(Upp::ArrayCtrl, list, LeftPosZ(492, 176).TopPosZ(352, 136))
|
||||
ITEM(Upp::ArrayCtrl, list2, LeftPosZ(852, 116).TopPosZ(12, 196))
|
||||
ITEM(Upp::Button, ok, SetLabel(t_("OK")).LeftPosZ(304, 80).TopPosZ(464, 20))
|
||||
ITEM(Upp::Button, cancel, SetLabel(t_("Cancel")).LeftPosZ(392, 80).TopPosZ(464, 20))
|
||||
ITEM(Upp::ColorPusher, color, LeftPosZ(152, 64).TopPosZ(264, 24))
|
||||
ITEM(Upp::DropTree, droptree, LeftPosZ(316, 120).TopPosZ(268, 19))
|
||||
ITEM(Upp::TreeCtrl, dv___55, LeftPosZ(696, 152).TopPosZ(12, 196))
|
||||
ITEM(Upp::RichTextView, dv___56, LeftPosZ(696, 152).TopPosZ(348, 136))
|
||||
ITEM(Upp::ColumnList, dv___57, LeftPosZ(696, 152).TopPosZ(212, 132))
|
||||
ITEM(Upp::DropList, skin, LeftPosZ(12, 164).TopPosZ(464, 19))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -14,26 +14,8 @@ void Dc(WithDropChoice<EditString>& dc)
|
|||
dc <<= "Case1";
|
||||
}
|
||||
|
||||
TestChStyle::TestChStyle()
|
||||
void TestChStyle::Skin()
|
||||
{
|
||||
AddFrame(menu);
|
||||
menu.Sub("Something", [=](Bar& bar) {
|
||||
bar.Add("Open..", [] { SelectFileOpen("*"); });
|
||||
bar.Add("Information..", [] { PromptOK("information."); });
|
||||
bar.Add("Exclamation..", [] { Exclamation("exclamation!"); });
|
||||
bar.Add("Question..", [] { PromptYesNo("question?"); });
|
||||
bar.Add("Error..", [] { ErrorYesNo("error?"); });
|
||||
bar.Add(false, "Disabled", [] {});
|
||||
static bool check;
|
||||
bar.Add("Check", [] { check = !check; }).Check(check);
|
||||
bar.Add("Check", CtrlImg::open(), [] { check = !check; }).Check(check);
|
||||
static bool radio;
|
||||
bar.Add("Radio", [] { radio = !radio; }).Radio(radio);
|
||||
bar.Separator();
|
||||
bar.Sub("Submenu", [](Bar& bar) { bar.Add("Something", []{}); });
|
||||
});
|
||||
|
||||
AddFrame(bar);
|
||||
bar.Set([](Bar& bar) {
|
||||
bar.Add(CtrlImg::open(), [] {
|
||||
FileSelNative fs;
|
||||
|
|
@ -65,6 +47,28 @@ TestChStyle::TestChStyle()
|
|||
PromptOK(~fs);
|
||||
}).Tip("This is test");
|
||||
});
|
||||
}
|
||||
|
||||
TestChStyle::TestChStyle()
|
||||
{
|
||||
AddFrame(menu);
|
||||
menu.Sub("Something", [=](Bar& bar) {
|
||||
bar.Add("Open..", [] { SelectFileOpen("*"); });
|
||||
bar.Add("Information..", [] { PromptOK("information."); });
|
||||
bar.Add("Exclamation..", [] { Exclamation("exclamation!"); });
|
||||
bar.Add("Question..", [] { PromptYesNo("question?"); });
|
||||
bar.Add("Error..", [] { ErrorYesNo("error?"); });
|
||||
bar.Add(false, "Disabled", [] {});
|
||||
static bool check;
|
||||
bar.Add("Check", [] { check = !check; }).Check(check);
|
||||
bar.Add("Check", CtrlImg::open(), [] { check = !check; }).Check(check);
|
||||
static bool radio;
|
||||
bar.Add("Radio", [] { radio = !radio; }).Radio(radio);
|
||||
bar.Separator();
|
||||
bar.Sub("Submenu", [](Bar& bar) { bar.Add("Something", []{}); });
|
||||
});
|
||||
|
||||
AddFrame(bar);
|
||||
|
||||
CtrlLayoutOKCancel(*this, "Window title");
|
||||
|
||||
|
|
@ -127,6 +131,7 @@ TestChStyle::TestChStyle()
|
|||
pi5.Percent();
|
||||
|
||||
list.HeaderObject().Absolute();
|
||||
list.OddRowColor();
|
||||
list.AddColumn("Col", 50).Sorting();
|
||||
list.AddColumn("Col", 50).Sorting();
|
||||
list.AddColumn("Col", 50).Sorting();
|
||||
|
|
@ -136,6 +141,12 @@ TestChStyle::TestChStyle()
|
|||
for(int i = 0; i < 50; i++)
|
||||
list.Add(i);
|
||||
|
||||
list2.AddColumn("Col");
|
||||
list2.EvenRowColor();
|
||||
list2.OddRowColor();
|
||||
for(int i = 0; i < 50; i++)
|
||||
list2.Add(i);
|
||||
|
||||
es_error.Error();
|
||||
es_error.NullText(CtrlImg::Computer());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue