mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-27 06:35:16 +00:00
Merge branch 'main' into beta
This commit is contained in:
commit
5ec88ad659
@ -49,7 +49,7 @@ You can ask for help in:
|
||||
|
||||
## Authors
|
||||
|
||||
Aseprite is being developed by [Igara Studio](https://www.igarastudio.com/):
|
||||
Aseprite is being developed by [Igara Studio](https://igara.com/):
|
||||
|
||||
* [David Capello](https://davidcapello.com/)
|
||||
* [Gaspar Capello](https://github.com/Gasparoken)
|
||||
|
@ -508,9 +508,6 @@
|
||||
<style id="tooltip_window_arrow">
|
||||
<background part="tooltip_arrow" />
|
||||
</style>
|
||||
<style id="tooltip_face">
|
||||
<background color="tooltip_face" />
|
||||
</style>
|
||||
<style id="tooltip_text">
|
||||
<background color="tooltip_face" />
|
||||
<text color="tooltip_text" align="left" />
|
||||
|
@ -26,7 +26,7 @@
|
||||
<separator horizontal="true" />
|
||||
<hbox>
|
||||
<label text="Copyright (C) 2001-2022" />
|
||||
<link text="Igara Studio S.A." url="https://www.igarastudio.com/" />
|
||||
<link text="Igara Studio S.A." url="https://igara.com/" />
|
||||
</hbox>
|
||||
<link text="https://www.aseprite.org/" url="https://www.aseprite.org/" />
|
||||
<hbox>
|
||||
|
@ -1430,8 +1430,7 @@ void SkinTheme::paintTextBox(ui::PaintEvent& ev)
|
||||
Graphics* g = ev.graphics();
|
||||
Widget* widget = static_cast<Widget*>(ev.getSource());
|
||||
|
||||
Theme::drawTextBox(g, widget, nullptr, nullptr,
|
||||
BGCOLOR, colors.textboxText());
|
||||
Theme::paintTextBoxWithStyle(g, widget);
|
||||
}
|
||||
|
||||
void SkinTheme::paintViewViewport(PaintEvent& ev)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite UI Library
|
||||
// Copyright (C) 2019-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2019-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
@ -294,6 +294,28 @@ void Theme::paintTooltip(Graphics* g,
|
||||
}
|
||||
}
|
||||
|
||||
gfx::Size Theme::paintTextBoxWithStyle(Graphics* g,
|
||||
const Widget* widget)
|
||||
{
|
||||
gfx::Size size;
|
||||
gfx::Color bg = gfx::ColorNone, fg = gfx::ColorNone;
|
||||
|
||||
for_each_layer(
|
||||
PaintWidgetPartInfo::getStyleFlagsForWidget(widget),
|
||||
widget->style(),
|
||||
[&fg, &bg](const Style::Layer& layer) {
|
||||
switch (layer.type()) {
|
||||
case Style::Layer::Type::kBackground: bg = layer.color(); break;
|
||||
case Style::Layer::Type::kText: fg = layer.color(); break;
|
||||
}
|
||||
});
|
||||
|
||||
if (fg != gfx::ColorNone)
|
||||
Theme::drawTextBox(g, widget, &size.w, &size.h, bg, fg);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
void Theme::paintLayer(Graphics* g,
|
||||
const Style* style,
|
||||
const Style::Layer& layer,
|
||||
@ -744,7 +766,7 @@ void Theme::drawSlices(Graphics* g, os::Surface* sheet,
|
||||
}
|
||||
|
||||
// static
|
||||
void Theme::drawTextBox(Graphics* g, Widget* widget,
|
||||
void Theme::drawTextBox(Graphics* g, const Widget* widget,
|
||||
int* w, int* h, gfx::Color bg, gfx::Color fg)
|
||||
{
|
||||
View* view = (g ? View::getView(widget): nullptr);
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite UI Library
|
||||
// Copyright (C) 2020-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2020-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2017 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
@ -101,6 +101,9 @@ namespace ui {
|
||||
const int arrowAlign,
|
||||
const gfx::Rect& target);
|
||||
|
||||
gfx::Size paintTextBoxWithStyle(Graphics* g,
|
||||
const Widget* widget);
|
||||
|
||||
virtual gfx::Size calcSizeHint(const Widget* widget,
|
||||
const Style* style);
|
||||
virtual gfx::Border calcBorder(const Widget* widget,
|
||||
@ -125,8 +128,8 @@ namespace ui {
|
||||
const gfx::Color color,
|
||||
const bool drawCenter = true);
|
||||
|
||||
static void drawTextBox(Graphics* g, Widget* textbox,
|
||||
int* w, int* h, gfx::Color bg, gfx::Color fg);
|
||||
static void drawTextBox(Graphics* g, const Widget* textbox,
|
||||
int* w, int* h, gfx::Color bg, gfx::Color fg);
|
||||
|
||||
protected:
|
||||
virtual void onRegenerateTheme() = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user