From 1ea93e2913851e31c8454d6ac2923e32fef3f9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 27 Nov 2025 11:50:01 +0100 Subject: [PATCH] Small refactor of text rect measurement. Add move/resize icons --- Common/Render/DrawBuffer.cpp | 6 ++-- Common/Render/DrawBuffer.h | 3 +- Common/Render/Text/draw_text.cpp | 6 ++-- Common/Render/Text/draw_text.h | 2 +- Common/UI/Context.cpp | 14 ++++---- Common/UI/Context.h | 4 +-- Common/UI/PopupScreens.cpp | 9 ++---- Common/UI/View.cpp | 55 +++++++++++++------------------- Common/UI/View.h | 1 + Core/Util/PPGeDraw.cpp | 7 ++-- UI/DisplayLayoutScreen.cpp | 4 +-- UI/TouchControlLayoutScreen.cpp | 4 +-- UI/UIAtlas.cpp | 2 ++ assets/ui_images/images.svg | 17 +++++++--- 14 files changed, 65 insertions(+), 69 deletions(-) diff --git a/Common/Render/DrawBuffer.cpp b/Common/Render/DrawBuffer.cpp index 1cd095d9ea..463f52fb6e 100644 --- a/Common/Render/DrawBuffer.cpp +++ b/Common/Render/DrawBuffer.cpp @@ -528,7 +528,7 @@ void DrawBuffer::MeasureText(FontID font, std::string_view text, float *w, float if (h) *h = atlasfont->height * fontscaley * lines; } -void DrawBuffer::MeasureTextRect(FontID font_id, std::string_view text, const Bounds &bounds, float *w, float *h, int align) { +void DrawBuffer::MeasureTextRect(FontID font_id, std::string_view text, float maxWidth, float *w, float *h, int align) { if (text.empty() || font_id.isInvalid()) { *w = 0.0f; *h = 0.0f; @@ -546,7 +546,7 @@ void DrawBuffer::MeasureTextRect(FontID font_id, std::string_view text, const Bo return; } std::string toMeasure = std::string(text); - AtlasWordWrapper wrapper(*font, fontscalex, toMeasure, bounds.w, wrap); + AtlasWordWrapper wrapper(*font, fontscalex, toMeasure, maxWidth, wrap); toMeasure = wrapper.Wrapped(); MeasureText(font_id, toMeasure, w, h); } else { @@ -591,7 +591,7 @@ void DrawBuffer::DrawTextRect(FontID font, std::string_view text, float x, float } float totalWidth, totalHeight; - MeasureTextRect(font, toDraw, Bounds(x, y, w, h), &totalWidth, &totalHeight, align); + MeasureTextRect(font, toDraw, w, &totalWidth, &totalHeight, align); std::vector lines; SplitString(toDraw, '\n', lines); diff --git a/Common/Render/DrawBuffer.h b/Common/Render/DrawBuffer.h index 45e39443c0..1b1067a9de 100644 --- a/Common/Render/DrawBuffer.h +++ b/Common/Render/DrawBuffer.h @@ -128,8 +128,7 @@ public: void DrawImage2GridH(ImageID atlas_image, float x1, float y1, float x2, Color color = COLOR(0xFFFFFF), float scale = 1.0); void MeasureText(FontID font, std::string_view text, float *w, float *h); - - void MeasureTextRect(FontID font, std::string_view text, const Bounds &bounds, float *w, float *h, int align = 0); + void MeasureTextRect(FontID font, std::string_view text, float maxWidth, float *w, float *h, int align = 0); void DrawTextRect(FontID font, std::string_view text, float x, float y, float w, float h, Color color = 0xFFFFFFFF, int align = 0); void DrawText(FontID font, std::string_view text, float x, float y, Color color = 0xFFFFFFFF, int align = 0); diff --git a/Common/Render/Text/draw_text.cpp b/Common/Render/Text/draw_text.cpp index d520f0f9f0..c7d7e6b6e6 100644 --- a/Common/Render/Text/draw_text.cpp +++ b/Common/Render/Text/draw_text.cpp @@ -148,15 +148,15 @@ void TextDrawer::MeasureString(std::string_view str, float *w, float *h) { *h = entry->height * fontScaleY_ * dpiScale_; } -void TextDrawer::MeasureStringRect(std::string_view str, const Bounds &bounds, float *w, float *h, int align) { +void TextDrawer::MeasureStringRect(std::string_view str, float maxWidth, float *w, float *h, int align) { const int wrap = align & (FLAG_WRAP_TEXT | FLAG_ELLIPSIZE_TEXT); float plainW, plainH; MeasureString(str, &plainW, &plainH); - if (wrap && plainW > bounds.w) { + if (wrap && plainW > maxWidth) { std::string toMeasure = std::string(str); - WrapString(toMeasure, toMeasure, bounds.w, wrap); + WrapString(toMeasure, toMeasure, maxWidth, wrap); MeasureString(toMeasure, w, h); } else { *w = plainW; diff --git a/Common/Render/Text/draw_text.h b/Common/Render/Text/draw_text.h index 9dcdca18a9..06423d0fd1 100644 --- a/Common/Render/Text/draw_text.h +++ b/Common/Render/Text/draw_text.h @@ -50,7 +50,7 @@ public: void SetFontScale(float xscale, float yscale); void MeasureString(std::string_view str, float *w, float *h); - void MeasureStringRect(std::string_view str, const Bounds &bounds, float *w, float *h, int align = ALIGN_TOPLEFT); + void MeasureStringRect(std::string_view str, float maxWidth, float *w, float *h, int align = ALIGN_TOPLEFT); void DrawString(DrawBuffer &target, std::string_view str, float x, float y, uint32_t color, int align = ALIGN_TOPLEFT); void DrawStringRect(DrawBuffer &target, std::string_view str, const Bounds &bounds, uint32_t color, int align); diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index 74aa2d1291..8f1a2b38f9 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -229,16 +229,16 @@ void UIContext::MeasureText(const FontStyle &style, float scaleX, float scaleY, } } -void UIContext::MeasureTextRect(const FontStyle &style, float scaleX, float scaleY, std::string_view str, const Bounds &bounds, float *x, float *y, int align) const { +void UIContext::MeasureTextRect(const FontStyle &style, float scaleX, float scaleY, std::string_view str, float maxWidth, float *x, float *y, int align) const { _dbg_assert_(str.data() != nullptr); if (!textDrawer_ || (align & FLAG_DYNAMIC_ASCII)) { float sizeFactor = (float)style.sizePts / 24.0f; Draw()->SetFontScale(scaleX * sizeFactor, scaleY * sizeFactor); - Draw()->MeasureTextRect(AtlasFontFromStyle(style), str, bounds, x, y, align); + Draw()->MeasureTextRect(AtlasFontFromStyle(style), str, maxWidth, x, y, align); } else { textDrawer_->SetOrCreateFont(style); textDrawer_->SetFontScale(scaleX, scaleY); - textDrawer_->MeasureStringRect(str, bounds, x, y, align); + textDrawer_->MeasureStringRect(str, maxWidth, x, y, align); textDrawer_->SetOrCreateFont(*fontStyle_); } } @@ -295,11 +295,11 @@ void UIContext::DrawTextRect(std::string_view str, const Bounds &bounds, uint32_ static constexpr float MIN_TEXT_SCALE = 0.7f; -float UIContext::CalculateTextScale(std::string_view str, float availWidth, float availHeight) const { +float UIContext::CalculateTextScale(std::string_view str, float availWidth) const { float actualWidth, actualHeight; - Bounds availBounds(0, 0, availWidth, availHeight); - MeasureTextRect(theme->uiFont, 1.0f, 1.0f, str, availBounds, &actualWidth, &actualHeight, ALIGN_VCENTER); + MeasureTextRect(theme->uiFont, 1.0f, 1.0f, str, availWidth, &actualWidth, &actualHeight, ALIGN_VCENTER); if (actualWidth > availWidth) { + // TODO: Return feedback that wrapping was needed. return std::max(MIN_TEXT_SCALE, availWidth / actualWidth); } return 1.0f; @@ -312,7 +312,7 @@ void UIContext::DrawTextRectSqueeze(std::string_view str, const Bounds &bounds, } float origScaleX = fontScaleX_; float origScaleY = fontScaleY_; - float scale = CalculateTextScale(str, bounds.w / origScaleX, bounds.h / origScaleY); + float scale = CalculateTextScale(str, bounds.w / origScaleX); SetFontScale(scale * origScaleX, scale * origScaleY); Bounds textBounds(bounds.x, bounds.y, bounds.w, bounds.h); DrawTextRect(str, textBounds, color, align); diff --git a/Common/UI/Context.h b/Common/UI/Context.h index 74cf390c32..7d1e362001 100644 --- a/Common/UI/Context.h +++ b/Common/UI/Context.h @@ -95,7 +95,7 @@ public: const FontStyle &GetFontStyle() { return *fontStyle_; } void SetFontScale(float scaleX, float scaleY); void MeasureText(const FontStyle &style, float scaleX, float scaleY, std::string_view str, float *x, float *y, int align = 0) const; - void MeasureTextRect(const FontStyle &style, float scaleX, float scaleY, std::string_view str, const Bounds &bounds, float *x, float *y, int align = 0) const; + void MeasureTextRect(const FontStyle &style, float scaleX, float scaleY, std::string_view str, float maxWidth, float *x, float *y, int align = 0) const; void DrawText(std::string_view str, float x, float y, uint32_t color, int align = 0); void DrawTextShadow(std::string_view str, float x, float y, uint32_t color, int align = 0); void DrawTextRect(std::string_view str, const Bounds &bounds, uint32_t color, int align = 0); @@ -103,7 +103,7 @@ public: // Will squeeze the text into the bounds if needed. void DrawTextRectSqueeze(std::string_view str, const Bounds &bounds, uint32_t color, int align = 0); - float CalculateTextScale(std::string_view str, float availWidth, float availHeight) const; + float CalculateTextScale(std::string_view str, float availWidth) const; void FillRect(const UI::Drawable &drawable, const Bounds &bounds); void DrawRectDropShadow(const Bounds &bounds, float radius, float alpha, uint32_t color = 0); diff --git a/Common/UI/PopupScreens.cpp b/Common/UI/PopupScreens.cpp index 5da19c0866..7212f4b899 100644 --- a/Common/UI/PopupScreens.cpp +++ b/Common/UI/PopupScreens.cpp @@ -821,10 +821,9 @@ void AbstractChoiceWithValueDisplay::GetContentDimensionsBySpec(const UIContext availWidth = 65535.0f; } float scale = CalculateValueScale(dc, valueText, availWidth); - Bounds availBounds(0, 0, availWidth, vert.size); float valueW, valueH; - dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, valueText, availBounds, &valueW, &valueH, ALIGN_RIGHT | ALIGN_VCENTER | FLAG_WRAP_TEXT); + dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, valueText, availWidth, &valueW, &valueH, ALIGN_RIGHT | ALIGN_VCENTER | FLAG_WRAP_TEXT); valueW += paddingX; // Give the choice itself less space to grow in, so it shrinks if needed. @@ -868,8 +867,7 @@ void AbstractChoiceWithValueDisplay::Draw(UIContext &dc) { float scale = CalculateValueScale(dc, valueText, availWidth); float w, h; - Bounds availBounds(0, 0, availWidth, bounds_.h); - dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, valueText, availBounds, &w, &h, ALIGN_RIGHT | ALIGN_VCENTER | FLAG_WRAP_TEXT); + dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, valueText, availWidth, &w, &h, ALIGN_RIGHT | ALIGN_VCENTER | FLAG_WRAP_TEXT); textPadding_.right = w + paddingX; Choice::Draw(dc); @@ -899,8 +897,7 @@ void AbstractChoiceWithValueDisplay::Draw(UIContext &dc) { float AbstractChoiceWithValueDisplay::CalculateValueScale(const UIContext &dc, std::string_view valueText, float availWidth) const { float actualWidth, actualHeight; - Bounds availBounds(0, 0, availWidth, bounds_.h); - dc.MeasureTextRect(dc.GetTheme().uiFont, 1.0f, 1.0f, valueText, availBounds, &actualWidth, &actualHeight); + dc.MeasureTextRect(dc.GetTheme().uiFont, 1.0f, 1.0f, valueText, availWidth, &actualWidth, &actualHeight); if (actualWidth > availWidth) { return std::max(0.8f, availWidth / actualWidth); } diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 9b7f64be54..e129b2bc3b 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -45,7 +45,7 @@ void MeasureBySpec(Size sz, float contentDim, MeasureSpec spec, float *measured) } } -static void ApplyBoundBySpec(float &bound, MeasureSpec spec) { +void ApplyBoundBySpec(float &bound, MeasureSpec spec) { switch (spec.type) { case AT_MOST: bound = bound < spec.size ? bound : spec.size; @@ -485,10 +485,9 @@ void Choice::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, } if (horiz.type != EXACTLY && layoutParams_->width > 0.0f && availWidth > layoutParams_->width) availWidth = layoutParams_->width; - float scale = dc.CalculateTextScale(text_, availWidth, bounds_.h); - Bounds availBounds(0, 0, availWidth, vert.size); + float scale = dc.CalculateTextScale(text_, availWidth); float textW = 0.0f, textH = 0.0f; - dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, text_, availBounds, &textW, &textH, FLAG_WRAP_TEXT); + dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, text_, availWidth, &textW, &textH, FLAG_WRAP_TEXT); totalH = std::max(totalH, textH); totalW += textW; if (image_.isValid()) { @@ -592,7 +591,7 @@ void InfoItem::Draw(UIContext &dc) { Bounds padBounds = bounds_.Expand(-paddingX, 0); float leftWidth, leftHeight; - dc.MeasureTextRect(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, padBounds, &leftWidth, &leftHeight, ALIGN_VCENTER); + dc.MeasureTextRect(dc.GetTheme().uiFont, 1.0f, 1.0f, text_, padBounds.w, &leftWidth, &leftHeight, ALIGN_VCENTER); dc.SetFontStyle(dc.GetTheme().uiFont); dc.DrawTextRect(text_, padBounds, style.fgColor, ALIGN_VCENTER); @@ -622,16 +621,13 @@ void ItemHeader::Draw(UIContext &dc) { } void ItemHeader::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert, float &w, float &h) const { - Bounds bounds(0, 0, layoutParams_->width, layoutParams_->height); - if (bounds.w < 0) { + float availWidth = layoutParams_->width; + if (availWidth < 0) { // If there's no size, let's grow as big as we want. - bounds.w = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; + availWidth = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; } - if (bounds.h < 0) { - bounds.h = vert.size == 0 ? MAX_ITEM_SIZE : vert.size; - } - ApplyBoundsBySpec(bounds, horiz, vert); - dc.MeasureTextRect(dc.GetTheme().uiFontSmall, 1.0f, 1.0f, text_, bounds, &w, &h, ALIGN_LEFT | ALIGN_VCENTER); + ApplyBoundBySpec(availWidth, horiz); + dc.MeasureTextRect(dc.GetTheme().uiFontSmall, 1.0f, 1.0f, text_, availWidth, &w, &h, ALIGN_LEFT | ALIGN_VCENTER); } std::string ItemHeader::DescribeText() const { @@ -664,16 +660,13 @@ void CollapsibleHeader::Draw(UIContext &dc) { } void CollapsibleHeader::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert, float &w, float &h) const { - Bounds bounds(0, 0, layoutParams_->width, layoutParams_->height); - if (bounds.w < 0) { + float availWidth = layoutParams_->width; + if (availWidth < 0) { // If there's no size, let's grow as big as we want. - bounds.w = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; + availWidth = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; } - if (bounds.h < 0) { - bounds.h = vert.size == 0 ? MAX_ITEM_SIZE : vert.size; - } - ApplyBoundsBySpec(bounds, horiz, vert); - dc.MeasureTextRect(dc.GetTheme().uiFontSmall, 1.0f, 1.0f, text_, bounds, &w, &h, ALIGN_LEFT | ALIGN_VCENTER); + ApplyBoundBySpec(availWidth, horiz); + dc.MeasureTextRect(dc.GetTheme().uiFontSmall, 1.0f, 1.0f, text_, availWidth, &w, &h, ALIGN_LEFT | ALIGN_VCENTER); } void CollapsibleHeader::GetContentDimensions(const UIContext &dc, float &w, float &h) const { @@ -859,11 +852,10 @@ void CheckBox::GetContentDimensions(const UIContext &dc, float &w, float &h) con } if (!text_.empty()) { - float scale = dc.CalculateTextScale(text_, availWidth, bounds_.h); + float scale = dc.CalculateTextScale(text_, availWidth); float actualWidth, actualHeight; - Bounds availBounds(0, 0, availWidth, bounds_.h); - dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, text_, availBounds, &actualWidth, &actualHeight, ALIGN_VCENTER | FLAG_WRAP_TEXT); + dc.MeasureTextRect(dc.GetTheme().uiFont, scale, scale, text_, availWidth, &actualWidth, &actualHeight, ALIGN_VCENTER | FLAG_WRAP_TEXT); h = std::max(actualHeight, ITEM_HEIGHT); } else { h = std::max(imageH, ITEM_HEIGHT); @@ -1093,22 +1085,19 @@ const FontStyle *TextView::GetTextStyle(const UIContext &dc, TextSize size) { } void TextView::GetContentDimensionsBySpec(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert, float &w, float &h) const { - Bounds bounds(0, 0, layoutParams_->width, layoutParams_->height); - if (bounds.w < 0) { + float availWidth = layoutParams_->width; + if (availWidth < 0) { // If there's no size, let's grow as big as we want. - bounds.w = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; + availWidth = horiz.size == 0 ? MAX_ITEM_SIZE : horiz.size; } - if (bounds.h < 0) { - bounds.h = vert.size == 0 ? MAX_ITEM_SIZE : vert.size; - } - ApplyBoundsBySpec(bounds, horiz, vert); + ApplyBoundBySpec(availWidth, horiz); if (bullet_) { - bounds.w -= bulletOffset; + availWidth -= bulletOffset; } const FontStyle *style = GetTextStyle(dc, textSize_); float measuredW; float measuredH; - dc.MeasureTextRect(*style, 1.0f, 1.0f, text_, bounds, &measuredW, &measuredH, textAlign_); + dc.MeasureTextRect(*style, 1.0f, 1.0f, text_, availWidth, &measuredW, &measuredH, textAlign_); w = measuredW + pad_.horiz(); h = measuredH + pad_.vert(); if (bullet_) { diff --git a/Common/UI/View.h b/Common/UI/View.h index 6bdbef3987..4e02bc30ba 100644 --- a/Common/UI/View.h +++ b/Common/UI/View.h @@ -1178,6 +1178,7 @@ private: }; void MeasureBySpec(Size sz, float contentWidth, MeasureSpec spec, float *measured); +void ApplyBoundBySpec(float &bound, MeasureSpec spec); void ApplyBoundsBySpec(Bounds &bounds, MeasureSpec horiz, MeasureSpec vert); bool IsDPadKey(const KeyInput &key); diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index 5524f6503f..9d7879cdb6 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -788,8 +788,7 @@ void PPGeMeasureText(float *w, float *h, std::string_view text, float scale, int int dtalign = (WrapType & PPGE_LINE_WRAP_WORD) ? FLAG_WRAP_TEXT : 0; if (WrapType & PPGE_LINE_USE_ELLIPSIS) dtalign |= FLAG_ELLIPSIZE_TEXT; - Bounds b(0, 0, wrapWidth <= 0 ? 480.0f : wrapWidth, 272.0f); - textDrawer->MeasureStringRect(s, b, &mw, &mh, dtalign); + textDrawer->MeasureStringRect(s, wrapWidth <= 0 ? 480.0f : wrapWidth, &mw, &mh, dtalign); if (w) *w = mw; @@ -1121,7 +1120,7 @@ void PPGeDrawTextWrapped(std::string_view text, float x, float y, float wrapWidt Bounds b(0, 0, wrapWidth <= 0 ? 480.0f - x : wrapWidth, wrapHeight); int tdalign = 0; textDrawer->SetFontScale(style.scale, style.scale); - textDrawer->MeasureStringRect(s, b, &actualWidth, &actualHeight, tdalign | FLAG_WRAP_TEXT); + textDrawer->MeasureStringRect(s, b.w, &actualWidth, &actualHeight, tdalign | FLAG_WRAP_TEXT); // Check if we need to scale the text down to fit better. PPGeStyle adjustedStyle = style; @@ -1129,7 +1128,7 @@ void PPGeDrawTextWrapped(std::string_view text, float x, float y, float wrapWidt // Cheap way to get the line height. float oneLine, twoLines; textDrawer->MeasureString("|", &actualWidth, &oneLine); - textDrawer->MeasureStringRect("|\n|", Bounds(0, 0, 480, 272), &actualWidth, &twoLines); + textDrawer->MeasureStringRect("|\n|", 480, &actualWidth, &twoLines); float lineHeight = twoLines - oneLine; if (actualHeight > wrapHeight * maxScaleDown) { diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index 439a098901..c66489a468 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -285,8 +285,8 @@ void DisplayLayoutScreen::CreateViews() { mode_ = new ChoiceStrip(ORIENT_HORIZONTAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); mode_->AddChoice(di->T("Inactive")); - mode_->AddChoice(di->T("Move")); - mode_->AddChoice(di->T("Resize")); + mode_->AddChoice(di->T("Move")); // , ImageID("I_MOVE") (can't fit the icons here yet, especially not in portrait) + mode_->AddChoice(di->T("Resize")); // , ImageID("I_RESIZE")); mode_->SetSelection(0, false); bottomControls->Add(mode_); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 02058eeebf..a5809f1a3c 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -655,8 +655,8 @@ void TouchControlLayoutScreen::CreateViews() { LinearLayout *leftColumn = leftColumnScroll->Add(new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(Margins(12.0f, 0.0f)))); mode_ = new ChoiceStrip(ORIENT_VERTICAL); - mode_->AddChoice(di->T("Move")); - mode_->AddChoice(di->T("Resize")); + mode_->AddChoice(di->T("Move"), ImageID("I_MOVE")); + mode_->AddChoice(di->T("Resize"), ImageID("I_RESIZE")); mode_->SetSelection(0, false); mode_->OnChoice.Handle(this, &TouchControlLayoutScreen::OnMode); diff --git a/UI/UIAtlas.cpp b/UI/UIAtlas.cpp index e4f5c91014..3cf766bea6 100644 --- a/UI/UIAtlas.cpp +++ b/UI/UIAtlas.cpp @@ -169,6 +169,8 @@ static const ImageMeta imageIDs[] = { {"I_DEVICE_ROTATION_AUTO", false}, {"I_DEVICE_ROTATION_LANDSCAPE", false}, {"I_DEVICE_ROTATION_PORTRAIT", false}, + {"I_MOVE", false}, + {"I_RESIZE", false}, }; static std::string PNGNameFromID(std::string_view id) { diff --git a/assets/ui_images/images.svg b/assets/ui_images/images.svg index ff06ccfb52..90c69de723 100644 --- a/assets/ui_images/images.svg +++ b/assets/ui_images/images.svg @@ -24,9 +24,9 @@ inkscape:pagecheckerboard="true" inkscape:deskcolor="#d1d1d1" inkscape:document-units="px" - inkscape:zoom="4.0000005" - inkscape:cx="140.74998" - inkscape:cy="572.37493" + inkscape:zoom="5.656855" + inkscape:cx="250.49255" + inkscape:cy="560.11689" inkscape:window-width="3840" inkscape:window-height="2071" inkscape:window-x="-9" @@ -4417,7 +4417,16 @@ class="st0" d="m 187.64684,-0.00670467 c -31.31297,0 -56.68624,25.38881767 -56.68624,56.70178667 V 455.31782 c 0,31.31197 25.37327,56.68624 56.68624,56.68624 h 167.64555 c 31.31197,0 56.70179,-25.37427 56.70179,-56.68624 V 56.695082 c 0,-31.312969 -25.38982,-56.70178667 -56.70179,-56.70178667 z M 189.40647,19.365499 H 347.472 c 32.17406,0 42.63128,22.427903 42.63128,41.636246 V 413.69712 c 0,17.6192 -11.53333,41.12318 -38.65112,41.12318 H 189.40647 c -19.02726,0 -38.54505,-18.22698 -38.54505,-41.12318 V 60.504224 c 0,-23.138502 13.18539,-41.138725 38.54505,-41.138725 z m 85.50526,448.219311 c 8.09399,0 14.66131,6.05813 14.66131,14.66131 0,8.10999 -6.56732,14.67685 -14.66131,14.67685 -8.09399,0 -14.67685,-6.56786 -14.67685,-14.67685 0,-8.094 6.58286,-14.66131 14.67685,-14.66131 z" sodipodi:nodetypes="sssssssssssssssssssssss" /> -