mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
bazaar/Theme updates
git-svn-id: svn://ultimatepp.org/upp/trunk@1335 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
551899a641
commit
69ed95ae22
4 changed files with 37 additions and 12 deletions
|
|
@ -376,23 +376,23 @@ Theme& Theme::Apply() {
|
|||
|
||||
if (group == "button" && useButton)
|
||||
LoadButton(Button::StyleNormal().Write(), set, MakePath(folder, "Button"), "Button");
|
||||
else if (group == "okbutton")
|
||||
else if (group == "okbutton" && useOkButton)
|
||||
LoadButton(Button::StyleOk().Write(), set, MakePath(folder, "OkButton"), "OkButton");
|
||||
else if (group == "edgebutton")
|
||||
else if (group == "edgebutton" && useEdgeButton)
|
||||
LoadButton(Button::StyleEdge().Write(), set, MakePath(folder, "EdgeButton"), "EdgeButton");
|
||||
else if (group == "leftedgebutton")
|
||||
else if (group == "leftedgebutton" && useLEdgeButton)
|
||||
LoadButton(Button::StyleLeftEdge().Write(), set, MakePath(folder, "LeftEdgeButton"), "LeftEdgeButton");
|
||||
else if (group == "option0")
|
||||
else if (group == "option0" && useOption)
|
||||
LoadOption0(set, MakePath(folder, "Option"), "Option0");
|
||||
else if (group == "option1")
|
||||
else if (group == "option1" && useOption)
|
||||
LoadOption1(set, MakePath(folder, "Option"), "Option1");
|
||||
else if (group == "option2")
|
||||
else if (group == "option2" && useOption)
|
||||
LoadOption2(set, MakePath(folder, "Option"), "Option2");
|
||||
else if (group == "switch0")
|
||||
else if (group == "switch0" && useSwitch)
|
||||
LoadSwitch0(set, MakePath(folder, "Switch"), "Switch0");
|
||||
else if (group == "switch1")
|
||||
else if (group == "switch1" && useSwitch)
|
||||
LoadSwitch1(set, MakePath(folder, "Switch"), "Switch1");
|
||||
else if (group == "spininc")
|
||||
else if (group == "spininc" && useOption)
|
||||
LoadButton(SpinButtons::StyleDefault().Write().inc, set, MakePath(folder, "Spin"), "SpinInc");
|
||||
else if (group == "spindec")
|
||||
LoadButton(SpinButtons::StyleDefault().Write().dec, set, MakePath(folder, "Spin"), "SpinDec");
|
||||
|
|
@ -411,7 +411,7 @@ Theme& Theme::Apply() {
|
|||
else if (group == "menubar")
|
||||
LoadMenuBar(MenuBar::StyleDefault().Write(), set, MakePath(folder, "MenuBar"), "Menu");
|
||||
else if (group == "toolbar")
|
||||
LoadToolBar(ToolBar::StyleDefault().Write(), set, MakePath(folder, "MenuBar"), "Menu");
|
||||
LoadToolBar(ToolBar::StyleDefault().Write(), set, MakePath(folder, "ToolBar"), "ToolBar");
|
||||
else if (group == "editfield")
|
||||
LoadEditField(EditField::StyleDefault().Write(), set, MakePath(folder, "EditField"), "EditField");
|
||||
else if (group == "viewedge") {
|
||||
|
|
@ -447,6 +447,10 @@ Theme& Theme::Apply() {
|
|||
String cm = GetMap(set, "colormark");
|
||||
if (!cm.IsEmpty())
|
||||
SColorMark_Write(StringToObject(cm));
|
||||
|
||||
String cd = GetMap(set, "colordissabled");
|
||||
if (!cd.IsEmpty())
|
||||
SColorDisabled_Write(StringToObject(cd));
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ private:
|
|||
bool useTab;
|
||||
bool useDropC;
|
||||
bool useDropL;
|
||||
bool useOkButton;
|
||||
bool useEdgeButton;
|
||||
bool useLEdgeButton;
|
||||
bool useOption;
|
||||
bool useSwitch;
|
||||
|
||||
void LoadEditField(EditField::Style& d, const VectorMap<String, String>& set, const String& dir, const String& file);
|
||||
void LoadButton(Button::Style& d, const VectorMap<String, String>& set, const String& dir, const String& file);
|
||||
|
|
@ -45,6 +50,12 @@ public:
|
|||
|
||||
bool HasButton() { return GetGroup("button") >= 0; }
|
||||
Theme& UseButton(bool use) { useButton = use; return *this; }
|
||||
bool HasOkButton() { return GetGroup("okbutton") >= 0; }
|
||||
Theme& UseOkButton(bool use) { useOkButton = use; return *this; }
|
||||
bool HasEdgeButton() { return GetGroup("edgebutton") >= 0; }
|
||||
Theme& UseEdgeButton(bool use) { useEdgeButton = use; return *this; }
|
||||
bool HasLeftEdgeButton() { return GetGroup("leftedgebutton") >= 0; }
|
||||
Theme& UseLeftEdgeButton(bool use) { useLEdgeButton = use; return *this; }
|
||||
bool HasHeaderCtrl() { return GetGroup("headerctrl") >= 0; }
|
||||
Theme& UseHeaderCtrl(bool use) { useHeader = use; return *this; }
|
||||
bool HasProgressIndicator() { return GetGroup("progress") >= 0; }
|
||||
|
|
@ -54,10 +65,16 @@ public:
|
|||
bool HasDropChoice() { return GetGroup("dropchoice") >= 0; }
|
||||
Theme& UseDropChoice(bool use) { useDropC = use; return *this; }
|
||||
bool HasDropList() { return GetGroup("droplist") >= 0; }
|
||||
Theme& UseDropList(bool use) { useDropL = use; return *this; }
|
||||
Theme& UseDropList(bool use) { useDropL = use; return *this; }
|
||||
bool HasSwitch() { return GetGroup("switch0") >= 0 || GetGroup("switch1") >= 0; }
|
||||
Theme& UseSwitch(bool use) { useSwitch = use; return *this; }
|
||||
bool HasOption() { return GetGroup("option0") >= 0 || GetGroup("option1") >= 0 || GetGroup("option2") >= 0; }
|
||||
Theme& UseOption(bool use) { useOption = use; return *this; }
|
||||
|
||||
Theme(): useButton(true), useHeader(true), useProgress(true), useTab(true),
|
||||
useDropC(true), useDropL(true) {}
|
||||
useDropC(true), useDropL(true), useOkButton(true),
|
||||
useEdgeButton(true), useLEdgeButton(true), useOption(true),
|
||||
useSwitch(true) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
uses
|
||||
plugin\zip;
|
||||
|
||||
file
|
||||
Theme.h,
|
||||
Theme.cpp;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#ifndef _Theme_icpp_init_stub
|
||||
#define _Theme_icpp_init_stub
|
||||
#include "plugin\zip/init"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue