mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Add theme dimension for the size of bars (hue, alpha, etc.) in the color selector
This commit is contained in:
parent
329c50bc2c
commit
178849a7c8
@ -27,6 +27,7 @@
|
||||
<dim id="color_bar_buttons_height" value="16" />
|
||||
<dim id="context_bar_height" value="18" />
|
||||
<dim id="brush_type_width" value="16" />
|
||||
<dim id="color_selector_bar_size" value="8" />
|
||||
</dimensions>
|
||||
<colors>
|
||||
<color id="text" value="#000000" />
|
||||
|
@ -487,8 +487,9 @@ void ColorSelector::paintColorIndicator(ui::Graphics* g,
|
||||
|
||||
gfx::Rect ColorSelector::bottomBarBounds() const
|
||||
{
|
||||
SkinTheme* theme = static_cast<SkinTheme*>(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<SkinTheme*>(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
|
||||
|
Loading…
x
Reference in New Issue
Block a user