mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-21 07:20:46 +00:00
Fix tooltip in SpriteProperties dialog
This commit is contained in:
parent
7e638cddcc
commit
36edf3f842
@ -21,7 +21,7 @@
|
||||
|
||||
<label text="@.transparent_color" />
|
||||
<hbox>
|
||||
<hbox id="transparent_color_placeholder" tooltip="@.transparent_color_tooltip" />
|
||||
<hbox id="transparent_color_placeholder" />
|
||||
</hbox>
|
||||
|
||||
<label text="@.pixel_ratio" />
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "app/commands/command.h"
|
||||
#include "app/context_access.h"
|
||||
#include "app/doc_api.h"
|
||||
#include "app/i18n/strings.h"
|
||||
#include "app/modules/gui.h"
|
||||
#include "app/pref/preferences.h"
|
||||
#include "app/tx.h"
|
||||
@ -117,6 +118,14 @@ void SpritePropertiesCommand::onExecute(Context* context)
|
||||
ColorButtonOptions());
|
||||
|
||||
window.transparentColorPlaceholder()->addChild(color_button);
|
||||
|
||||
// TODO add a way to get or create an existent TooltipManager
|
||||
TooltipManager* tooltipManager = new TooltipManager;
|
||||
window.addChild(tooltipManager);
|
||||
tooltipManager->addTooltipFor(
|
||||
color_button,
|
||||
Strings::sprite_properties_transparent_color_tooltip(),
|
||||
LEFT);
|
||||
}
|
||||
else {
|
||||
window.transparentColorPlaceholder()->addChild(new Label("(only for indexed images)"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user