summaryrefslogtreecommitdiff
path: root/src/gui/theme.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-20 12:27:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-20 13:01:26 +0300
commitc0de07eba43c8943eeecef04224016da8580d069 (patch)
tree38963c608516b807d820deee52c094e4f0aff151 /src/gui/theme.h
parentea4826bd3b81ace08b72c7e305aa0b1f89669110 (diff)
downloadmv-c0de07eba43c8943eeecef04224016da8580d069.tar.gz
mv-c0de07eba43c8943eeecef04224016da8580d069.tar.bz2
mv-c0de07eba43c8943eeecef04224016da8580d069.tar.xz
mv-c0de07eba43c8943eeecef04224016da8580d069.zip
Improve theme.
Diffstat (limited to 'src/gui/theme.h')
-rw-r--r--src/gui/theme.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/gui/theme.h b/src/gui/theme.h
index c0933f035..8bc40fe00 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -82,9 +82,12 @@ struct ThemeInfo final
class Skin final
{
public:
- Skin(ImageRect *restrict skin, const ImageRect *restrict images,
- const std::string &filePath, const std::string &name = "",
- const int padding = 3, const int titlePadding = 4,
+ Skin(ImageRect *const restrict skin,
+ const ImageRect *const restrict images,
+ const std::string &filePath,
+ const std::string &name = "",
+ const int padding = 3,
+ const int titlePadding = 4,
std::map<std::string, int> *restrict const options = nullptr);
A_DELETE_COPY(Skin)
@@ -176,7 +179,8 @@ class Skin final
std::map<std::string, int> *mOptions;
};
-class Theme final : public Palette, public ConfigListener
+class Theme final : public Palette,
+ public ConfigListener
{
public:
Theme();
@@ -450,12 +454,16 @@ class Theme final : public Palette, public ConfigListener
/**
* Loads a skin.
*/
- Skin *load(const std::string &filename, const std::string &filename2,
- const bool full = true, const std::string
+ Skin *load(const std::string &filename,
+ const std::string &filename2,
+ const bool full = true,
+ const std::string
&restrict defaultPath = getThemePath()) A_WARN_UNUSED;
- Skin *loadSkinRect(ImageRect &image, const std::string &name,
- const std::string &name2, const int start = 0,
+ Skin *loadSkinRect(ImageRect &image,
+ const std::string &name,
+ const std::string &name2,
+ const int start = 0,
const int end = 8) A_WARN_UNUSED;
void unload(Skin *const skin);
@@ -479,8 +487,10 @@ class Theme final : public Palette, public ConfigListener
void optionChanged(const std::string &) override final;
- void loadRect(ImageRect &image, const std::string &name,
- const std::string &name2, const int start = 0,
+ void loadRect(ImageRect &image,
+ const std::string &name,
+ const std::string &name2,
+ const int start = 0,
const int end = 8);
static void unloadRect(const ImageRect &rect,