diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-05-23 01:27:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-05-23 01:27:28 +0300 |
commit | b829d239006538b2e669f4aab191ffa5ad37af68 (patch) | |
tree | a492be3847f3e3b0704b60909313cfe55dba7ca5 /src/gui/widgets/shortcutcontainer.cpp | |
parent | 70bf45e429a649f59484968d0484a4326ed1a3e9 (diff) | |
download | mv-b829d239006538b2e669f4aab191ffa5ad37af68.tar.gz mv-b829d239006538b2e669f4aab191ffa5ad37af68.tar.bz2 mv-b829d239006538b2e669f4aab191ffa5ad37af68.tar.xz mv-b829d239006538b2e669f4aab191ffa5ad37af68.zip |
Add skin offsets for images and text in shortcut containers.
Diffstat (limited to 'src/gui/widgets/shortcutcontainer.cpp')
-rw-r--r-- | src/gui/widgets/shortcutcontainer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/widgets/shortcutcontainer.cpp b/src/gui/widgets/shortcutcontainer.cpp index f1e9c8a18..5eb4ea46f 100644 --- a/src/gui/widgets/shortcutcontainer.cpp +++ b/src/gui/widgets/shortcutcontainer.cpp @@ -25,6 +25,7 @@ #include "settings.h" #include "gui/gui.h" +#include "gui/skin.h" #include "utils/delete2.h" @@ -49,6 +50,10 @@ ShortcutContainer::ShortcutContainer(Widget2 *const widget) : mBoxHeight(1), mGridWidth(1), mGridHeight(1), + mImageOffsetX(2), + mImageOffsetY(2), + mTextOffsetX(2), + mTextOffsetY(2), mVertexes(new ImageCollection) { mAllowLogic = false; @@ -164,4 +169,11 @@ void ShortcutContainer::setSkin(const Widget2 *const widget, { setWidget2(widget); mSkin = skin; + if (mSkin) + { + mImageOffsetX = mSkin->getOption("imageOffsetX", 2); + mImageOffsetY = mSkin->getOption("imageOffsetY", 2); + mTextOffsetX = mSkin->getOption("textOffsetX", 2); + mTextOffsetY = mSkin->getOption("textOffsetY", 2); + } } |