summaryrefslogtreecommitdiff
path: root/src/resources/theme.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-06-08 20:59:57 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-07-11 20:41:55 +0200
commit6b89b661df1a2682edfa491e1bb9a21c4ab0943c (patch)
tree11bbe888ecf9b45eeb78e371c00b950e9c4c4cac /src/resources/theme.cpp
parentb3836dd46658d8bc24af2d60c5e7904d7f051bca (diff)
downloadmana-6b89b661df1a2682edfa491e1bb9a21c4ab0943c.tar.gz
mana-6b89b661df1a2682edfa491e1bb9a21c4ab0943c.tar.bz2
mana-6b89b661df1a2682edfa491e1bb9a21c4ab0943c.tar.xz
mana-6b89b661df1a2682edfa491e1bb9a21c4ab0943c.zip
Cleaned up ImageRect a little
* Use `std::unique_ptr`, so we can get rid of the custom move constructor and destructor. * Move and rename the `ImagePosition` enum to `WindowAlignment`, which fits better with what this enum is actually used for.
Diffstat (limited to 'src/resources/theme.cpp')
-rw-r--r--src/resources/theme.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/theme.cpp b/src/resources/theme.cpp
index 2845f91e..fa5f1a7d 100644
--- a/src/resources/theme.cpp
+++ b/src/resources/theme.cpp
@@ -695,7 +695,7 @@ void Theme::readSkinStateImgNode(XML::Node node, SkinState &state) const
border.right = right;
border.top = top;
border.bottom = bottom;
- border.image = image->getSubImage(x, y, width, height);
+ border.image.reset(image->getSubImage(x, y, width, height));
node.attribute("fill", border.fillMode);
}