mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Enhancement undo show tooltips option (fix #1827)
This commit is contained in:
parent
3035820d39
commit
336407fab6
@ -121,6 +121,7 @@
|
||||
<option id="size_limit" type="int" default="0" />
|
||||
<option id="goto_modified" type="bool" default="true" />
|
||||
<option id="allow_nonlinear_history" type="bool" default="false" />
|
||||
<option id="show_tooltip" type="bool" default="true" />
|
||||
</section>
|
||||
<section id="editor" text="Editor">
|
||||
<option id="zoom_with_wheel" type="bool" default="true" migrate="Options.ZoomWithMouseWheel" />
|
||||
|
@ -1001,6 +1001,7 @@ layer_edges_color = Layer Edges Color:
|
||||
auto_guides_color = Auto Guides Color:
|
||||
default_slice_color = Default Color:
|
||||
undo = Undo
|
||||
undo_show_tooltip = Show Undo Tooltip
|
||||
undo_size_limit = Undo Limit:
|
||||
undo_size_limit_tooltip = <<<END
|
||||
Limit of memory to be used
|
||||
|
@ -305,6 +305,8 @@
|
||||
tooltip="@.undo_goto_modified_tooltip" />
|
||||
<check id="undo_allow_nonlinear_history"
|
||||
text="@.undo_allow_nonlinear_history" />
|
||||
<check text="@.undo_show_tooltip" id="undo_show_tooltip"
|
||||
pref="undo.show_tooltip" />
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
|
@ -108,11 +108,15 @@ void UndoCommand::onExecute(Context* context)
|
||||
|
||||
StatusBar* statusbar = StatusBar::instance();
|
||||
if (statusbar) {
|
||||
statusbar->showTip(1000, "%s %s",
|
||||
(m_type == Undo ? "Undid": "Redid"),
|
||||
(m_type == Undo ?
|
||||
undo->nextUndoLabel().c_str():
|
||||
undo->nextRedoLabel().c_str()));
|
||||
std::string msg;
|
||||
if (m_type == Undo)
|
||||
msg = "Undid " + undo->nextUndoLabel();
|
||||
else
|
||||
msg = "Redid " + undo->nextRedoLabel();
|
||||
if (Preferences::instance().undo.showTooltip())
|
||||
statusbar->showTip(1000, msg.c_str());
|
||||
else
|
||||
statusbar->setStatusText(0, msg.c_str());
|
||||
}
|
||||
#endif // ENABLE_UI
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user