mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-27 02:37:16 +00:00
Fix "new version available" button size (fix #1354)
Regression introduced in 12726fedf2be5f697cffae86d77337bd16d9a738
This commit is contained in:
parent
4fada3aa00
commit
76edbda15c
@ -436,6 +436,11 @@
|
||||
<text color="link_hover" />
|
||||
</style>
|
||||
|
||||
<!-- browser_link -->
|
||||
<style id="browser_link" base="link">
|
||||
<text padding-top="1" />
|
||||
</style>
|
||||
|
||||
<!-- view -->
|
||||
<style id="view">
|
||||
<background part="sunken_normal" />
|
||||
|
@ -447,8 +447,12 @@ private:
|
||||
Label* label;
|
||||
|
||||
if (word.size() > 4 &&
|
||||
std::strncmp(word.c_str(), "http", 4) == 0)
|
||||
std::strncmp(word.c_str(), "http", 4) == 0) {
|
||||
label = new LinkLabel(word);
|
||||
label->setProperty(
|
||||
SkinStylePropertyPtr(
|
||||
new SkinStyleProperty(SkinTheme::instance()->styles.browserLink())));
|
||||
}
|
||||
else
|
||||
label = new Label(word);
|
||||
|
||||
@ -474,6 +478,9 @@ private:
|
||||
|
||||
void addLink(const std::string& url, const std::string& text) {
|
||||
auto label = new LinkLabel(url, text);
|
||||
label->setProperty(
|
||||
SkinStylePropertyPtr(
|
||||
new SkinStyleProperty(SkinTheme::instance()->styles.browserLink())));
|
||||
|
||||
if (url.find(':') == std::string::npos) {
|
||||
label->setUrl("");
|
||||
|
@ -1050,17 +1050,15 @@ void SkinTheme::paintLinkLabel(PaintEvent& ev)
|
||||
if (styleProp)
|
||||
style = styleProp->getStyle();
|
||||
|
||||
if (!is_transparent(bg))
|
||||
g->fillRect(bg, rc);
|
||||
rc.shrink(widget->border());
|
||||
|
||||
Style::State state;
|
||||
if (widget->hasMouseOver()) state += Style::hover();
|
||||
if (widget->isSelected()) state += Style::clicked();
|
||||
if (!widget->isEnabled()) state += Style::disabled();
|
||||
|
||||
widget->getTextIconInfo(nullptr, &text);
|
||||
style->paint(g, text, widget->text().c_str(), state);
|
||||
if (!is_transparent(bg))
|
||||
g->fillRect(bg, rc);
|
||||
|
||||
style->paint(g, rc, widget->text().c_str(), state);
|
||||
}
|
||||
|
||||
void SkinTheme::paintListBox(PaintEvent& ev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user