mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-17 13:20:45 +00:00
Add ui::MenuSeparator widget
This commit is contained in:
parent
e4df25f4df
commit
b12e6c3398
@ -209,7 +209,7 @@ Widget* AppMenus::convertXmlelemToMenuitem(TiXmlElement* elem)
|
||||
{
|
||||
// is it a <separator>?
|
||||
if (strcmp(elem->Value(), "separator") == 0)
|
||||
return new Separator("", HORIZONTAL);
|
||||
return new MenuSeparator;
|
||||
|
||||
const char* command_name = elem->Attribute("command");
|
||||
Command* command =
|
||||
@ -265,7 +265,7 @@ Widget* AppMenus::createInvalidVersionMenuitem()
|
||||
subMenu->addChild(new AppMenuItem(PACKAGE " is using a customized gui.xml (maybe from your HOME directory)."));
|
||||
subMenu->addChild(new AppMenuItem("You should update your customized gui.xml file to the new version to get"));
|
||||
subMenu->addChild(new AppMenuItem("the latest commands available."));
|
||||
subMenu->addChild(new Separator("", HORIZONTAL));
|
||||
subMenu->addChild(new MenuSeparator);
|
||||
subMenu->addChild(new AppMenuItem("You can bypass this validation adding the correct version"));
|
||||
subMenu->addChild(new AppMenuItem("number in <gui version=\"" VERSION "\"> element."));
|
||||
menuitem->setSubmenu(subMenu);
|
||||
|
@ -72,7 +72,7 @@ protected:
|
||||
deleteAllItem.Click.connect(&Item::onDeleteAllBrushes, this);
|
||||
menu.addChild(&lockItem);
|
||||
menu.addChild(&deleteItem);
|
||||
menu.addChild(new Separator("", HORIZONTAL));
|
||||
menu.addChild(new MenuSeparator);
|
||||
menu.addChild(&deleteAllItem);
|
||||
|
||||
// Here we make the popup window temporaly floating, so it's
|
||||
|
@ -299,12 +299,12 @@ void ColorBar::onPaletteButtonClick()
|
||||
des("Descending");
|
||||
menu.addChild(&rev);
|
||||
menu.addChild(&grd);
|
||||
menu.addChild(new ui::Separator("", HORIZONTAL));
|
||||
menu.addChild(new ui::MenuSeparator);
|
||||
menu.addChild(&hue);
|
||||
menu.addChild(&sat);
|
||||
menu.addChild(&bri);
|
||||
menu.addChild(&lum);
|
||||
menu.addChild(new ui::Separator("", HORIZONTAL));
|
||||
menu.addChild(new ui::MenuSeparator);
|
||||
menu.addChild(&asc);
|
||||
menu.addChild(&des);
|
||||
|
||||
|
@ -1612,7 +1612,7 @@ void Editor::showAnimationSpeedMultiplierPopup(bool withStopBehaviorOptions)
|
||||
}
|
||||
|
||||
if (withStopBehaviorOptions) {
|
||||
menu.addChild(new Separator("", HORIZONTAL));
|
||||
menu.addChild(new MenuSeparator);
|
||||
MenuItem* item = new MenuItem("Rewind on Stop");
|
||||
item->Click.connect(
|
||||
[]() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite UI Library
|
||||
// Copyright (C) 2001-2013 David Capello
|
||||
// Copyright (C) 2001-2013, 2015 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -11,6 +11,7 @@
|
||||
#include "base/signal.h"
|
||||
#include "base/unique_ptr.h"
|
||||
#include "ui/register_message.h"
|
||||
#include "ui/separator.h"
|
||||
#include "ui/widget.h"
|
||||
|
||||
namespace ui {
|
||||
@ -19,8 +20,7 @@ namespace ui {
|
||||
class Timer;
|
||||
struct MenuBaseData;
|
||||
|
||||
class Menu : public Widget
|
||||
{
|
||||
class Menu : public Widget {
|
||||
public:
|
||||
Menu();
|
||||
~Menu();
|
||||
@ -147,6 +147,12 @@ namespace ui {
|
||||
friend class MenuBox;
|
||||
};
|
||||
|
||||
class MenuSeparator : public Separator {
|
||||
public:
|
||||
MenuSeparator() : Separator("", HORIZONTAL) {
|
||||
}
|
||||
};
|
||||
|
||||
extern RegisterMessage kOpenMenuItemMessage;
|
||||
extern RegisterMessage kCloseMenuItemMessage;
|
||||
extern RegisterMessage kClosePopupMessage;
|
||||
|
Loading…
x
Reference in New Issue
Block a user