From 22ed653d8b630c813333d5c73a4ca02dede2a5a5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Sep 2012 22:12:03 +0300 Subject: Add theme attribute for close button padding. Attribute name: closePadding Default value: 3 pixels. --- src/gui/theme.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/theme.cpp') diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 26f250c4c..26d1e7402 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -431,6 +431,7 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) memset(&images, 0, sizeof(ImageRect)); int padding = 3; int titlePadding = 4; + int closePadding = 3; std::map *const mOptions = new std::map(); @@ -483,6 +484,10 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) { titlePadding = XML::getProperty(partNode, "value", 4); } + else if (name == "closePadding") + { + closePadding = XML::getProperty(partNode, "value", 3); + } else { (*mOptions)[name] = XML::getProperty( @@ -501,6 +506,8 @@ Skin *Theme::readSkin(const std::string &filename, const bool full) if (dBorders) dBorders->decRef(); + (*mOptions)["closePadding"] = closePadding; + Skin *const skin = new Skin(border, images, filename, "", padding, titlePadding, mOptions); skin->updateAlpha(mMinimumOpacity); -- cgit v1.2.3-60-g2f50