Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/windowing
diff options
context:
space:
mode:
Diffstat (limited to 'source/windowing')
-rw-r--r--source/windowing/StarGuiContext.cpp2
-rw-r--r--source/windowing/StarImageWidget.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/source/windowing/StarGuiContext.cpp b/source/windowing/StarGuiContext.cpp
index 463e341..70ef67b 100644
--- a/source/windowing/StarGuiContext.cpp
+++ b/source/windowing/StarGuiContext.cpp
@@ -313,7 +313,7 @@ bool GuiContext::trySetCursor(Drawable const& drawable, Vec2I const& offset, int
auto assets = Root::singleton().assets();
auto& imagePath = drawable.imagePart().image;
- return applicationController()->setCursorImage(imagePath, assets->image(imagePath), pixelRatio, offset);
+ return applicationController()->setCursorImage(AssetPath::join(imagePath), assets->image(imagePath), pixelRatio, offset);
}
RectF GuiContext::renderText(String const& s, TextPositioning const& position) {
diff --git a/source/windowing/StarImageWidget.cpp b/source/windowing/StarImageWidget.cpp
index c189eac..ef82c33 100644
--- a/source/windowing/StarImageWidget.cpp
+++ b/source/windowing/StarImageWidget.cpp
@@ -41,9 +41,10 @@ void ImageWidget::setRotation(float rotation) {
}
String ImageWidget::image() const {
- if (!m_drawables.size())
+ if (m_drawables.empty())
return "";
- return m_drawables[0].imagePart().image;
+ else
+ return AssetPath::join(m_drawables[0].imagePart().image);
}
void ImageWidget::setDrawables(List<Drawable> drawables) {