mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix clicking on a user data popup widgets
The textbox used in the tooltip was getting all clicks from the user. So on the user data popup we have to 1) don't set the title bar text, 2) if the title bar is not set the text box is hidden so will not eat all click messages.
This commit is contained in:
parent
e2a94b094a
commit
62db0c73a3
@ -519,7 +519,6 @@ in_front_toolip = For all kind of layers (background and transparents)
|
||||
title = Undo History
|
||||
|
||||
[user_data]
|
||||
title = User Data
|
||||
user_data = User Data:
|
||||
color = Color:
|
||||
|
||||
|
@ -874,6 +874,10 @@
|
||||
<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" />
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!-- Aseprite -->
|
||||
<!-- Copyright (C) 2001-2016 by David Capello -->
|
||||
<!-- Copyright (C) 2001-2017 by David Capello -->
|
||||
<gui>
|
||||
<tipwindow id="user_data" text="@.title">
|
||||
<vbox>
|
||||
<tipwindow id="user_data">
|
||||
<vbox style="tooltip_face">
|
||||
<label text="@.user_data" style="tooltip_text" />
|
||||
<entry id="text" magnet="true" maxsize="65535" minwidth="128" expansive="true" />
|
||||
<hbox>
|
||||
|
@ -135,6 +135,7 @@ TipWindow::TipWindow(const std::string& text)
|
||||
|
||||
// Here we build our own custimized label for the window
|
||||
// (a text box).
|
||||
m_textBox->setVisible(false);
|
||||
addChild(m_textBox);
|
||||
setText(text);
|
||||
|
||||
@ -251,7 +252,12 @@ void TipWindow::onPaint(PaintEvent& ev)
|
||||
|
||||
void TipWindow::onBuildTitleLabel()
|
||||
{
|
||||
m_textBox->setText(text());
|
||||
if (!text().empty()) {
|
||||
m_textBox->setVisible(true);
|
||||
m_textBox->setText(text());
|
||||
}
|
||||
else
|
||||
m_textBox->setVisible(false);
|
||||
}
|
||||
|
||||
} // namespace ui
|
||||
|
Loading…
x
Reference in New Issue
Block a user