From 96ef977311a678f0e34f43fecd38b381721ce336 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 14 Dec 2023 14:26:34 -0300 Subject: [PATCH] Add new "shade_empty" style to paint the empty shades label (fix #4225) --- data/extensions/aseprite-theme/dark/theme.xml | 4 ++++ data/extensions/aseprite-theme/theme.xml | 4 ++++ src/app/ui/color_shades.cpp | 10 ++++++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/data/extensions/aseprite-theme/dark/theme.xml b/data/extensions/aseprite-theme/dark/theme.xml index 6999ab9aa..c8b0e24a1 100644 --- a/data/extensions/aseprite-theme/dark/theme.xml +++ b/data/extensions/aseprite-theme/dark/theme.xml @@ -993,6 +993,10 @@ + diff --git a/data/extensions/aseprite-theme/theme.xml b/data/extensions/aseprite-theme/theme.xml index 7c6f9c492..5f14a6531 100644 --- a/data/extensions/aseprite-theme/theme.xml +++ b/data/extensions/aseprite-theme/theme.xml @@ -983,6 +983,10 @@ + diff --git a/src/app/ui/color_shades.cpp b/src/app/ui/color_shades.cpp index 29598156d..072523578 100644 --- a/src/app/ui/color_shades.cpp +++ b/src/app/ui/color_shades.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2019-2022 Igara Studio S.A. +// Copyright (C) 2019-2023 Igara Studio S.A. // Copyright (C) 2018 David Capello // // This program is distributed under the terms of @@ -301,9 +301,11 @@ void ColorShades::onPaint(ui::PaintEvent& ev) } } else { - g->fillRect(theme->colors.editorFace(), bounds); - g->drawAlignedUIText(text(), theme->colors.face(), gfx::ColorNone, bounds, - ui::CENTER | ui::MIDDLE); + ui::PaintWidgetPartInfo info; + const std::string& text = this->text(); + info.text = &text; + theme->paintWidgetPart( + g, theme->styles.shadeEmpty(), bounds, info); } }