From 178849a7c875b67979a6ea3c5010e75a3dcb3bba Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 15 Nov 2018 11:22:30 -0300 Subject: [PATCH] Add theme dimension for the size of bars (hue, alpha, etc.) in the color selector --- data/extensions/aseprite-theme/theme.xml | 1 + src/app/ui/color_selector.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/extensions/aseprite-theme/theme.xml b/data/extensions/aseprite-theme/theme.xml index dae68915f..e949c1219 100644 --- a/data/extensions/aseprite-theme/theme.xml +++ b/data/extensions/aseprite-theme/theme.xml @@ -27,6 +27,7 @@ + diff --git a/src/app/ui/color_selector.cpp b/src/app/ui/color_selector.cpp index 68389f650..fd2c2965b 100644 --- a/src/app/ui/color_selector.cpp +++ b/src/app/ui/color_selector.cpp @@ -487,8 +487,9 @@ void ColorSelector::paintColorIndicator(ui::Graphics* g, gfx::Rect ColorSelector::bottomBarBounds() const { + SkinTheme* theme = static_cast(this->theme()); const gfx::Rect rc = childrenBounds(); - const int size = 8*guiscale(); // TODO 8 should be configurable in theme.xml + const int size = theme->dimensions.colorSelectorBarSize(); if (rc.h > 2*size) { if (rc.h > 3*size) // Alpha bar is visible too return gfx::Rect(rc.x, rc.y2()-size*2, rc.w, size); @@ -501,8 +502,9 @@ gfx::Rect ColorSelector::bottomBarBounds() const gfx::Rect ColorSelector::alphaBarBounds() const { + SkinTheme* theme = static_cast(this->theme()); const gfx::Rect rc = childrenBounds(); - const int size = 8*guiscale(); // TODO 8 should be configurable in theme.xml + const int size = theme->dimensions.colorSelectorBarSize(); if (rc.h > 3*size) return gfx::Rect(rc.x, rc.y2()-size, rc.w, size); else