mirror of https://gitlab.com/nakst/essence
redesign toolbars
This commit is contained in:
parent
2887968632
commit
52e35a7636
|
@ -589,7 +589,7 @@ void ThumbnailGenerateTask(Instance *, Task *task) {
|
|||
}
|
||||
|
||||
// TODO Determine the best value for these constants -- maybe base it off the current UI scale factor?
|
||||
uint32_t thumbnailMaximumWidth = 120;
|
||||
uint32_t thumbnailMaximumWidth = 143;
|
||||
uint32_t thumbnailMaximumHeight = 80;
|
||||
EsRectangle targetRectangle = EsRectangleFit(ES_RECT_2S(thumbnailMaximumWidth, thumbnailMaximumHeight), ES_RECT_2S(originalWidth, originalHeight), false);
|
||||
uint32_t targetWidth = ES_RECT_WIDTH(targetRectangle), targetHeight = ES_RECT_HEIGHT(targetRectangle);
|
||||
|
@ -1039,7 +1039,7 @@ int BreadcrumbBarMessage(EsElement *element, EsMessage *message) {
|
|||
|
||||
#define ADD_BUTTON_TO_TOOLBAR(_command, _label, _icon, _accessKey, _name) \
|
||||
{ \
|
||||
_name = EsButtonCreate(toolbar, ES_FLAGS_DEFAULT, 0, _label); \
|
||||
_name = EsButtonCreate(buttonGroup, ES_FLAGS_DEFAULT, 0, _label); \
|
||||
EsButtonSetIcon(_name, _icon); \
|
||||
EsCommandAddButton(&instance->_command, _name); \
|
||||
_name->accessKey = _accessKey; \
|
||||
|
@ -1047,7 +1047,7 @@ int BreadcrumbBarMessage(EsElement *element, EsMessage *message) {
|
|||
|
||||
#define ADD_BUTTON_TO_STATUS_BAR(_command, _label, _icon, _accessKey, _name) \
|
||||
{ \
|
||||
_name = EsButtonCreate(statusBar, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_STATUS_BAR, _label); \
|
||||
_name = EsButtonCreate(buttonGroup, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_STATUS_BAR, _label); \
|
||||
EsButtonSetIcon(_name, _icon); \
|
||||
EsCommandAddButton(&instance->_command, _name); \
|
||||
_name->accessKey = _accessKey; \
|
||||
|
@ -1084,22 +1084,30 @@ void InstanceCreateUI(Instance *instance) {
|
|||
// Toolbar:
|
||||
|
||||
EsElement *toolbar = EsWindowGetToolbar(instance->window);
|
||||
EsPanel *buttonGroup = EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL);
|
||||
ADD_BUTTON_TO_TOOLBAR(commandGoBackwards, nullptr, ES_ICON_GO_PREVIOUS_SYMBOLIC, 'B', button);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
ADD_BUTTON_TO_TOOLBAR(commandGoForwards, nullptr, ES_ICON_GO_NEXT_SYMBOLIC, 'F', button);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
ADD_BUTTON_TO_TOOLBAR(commandGoParent, nullptr, ES_ICON_GO_UP_SYMBOLIC, 'U', button);
|
||||
EsSpacerCreate(toolbar, ES_FLAGS_DEFAULT);
|
||||
instance->breadcrumbBar = EsTextboxCreate(toolbar, ES_CELL_H_FILL | ES_TEXTBOX_EDIT_BASED | ES_TEXTBOX_REJECT_EDIT_IF_LOST_FOCUS, {});
|
||||
EsSpacerCreate(toolbar, ES_FLAGS_DEFAULT, ES_STYLE_TOOLBAR_SPACER);
|
||||
instance->breadcrumbBar = EsTextboxCreate(toolbar, ES_CELL_H_FILL | ES_TEXTBOX_EDIT_BASED | ES_TEXTBOX_REJECT_EDIT_IF_LOST_FOCUS);
|
||||
instance->breadcrumbBar->messageUser = BreadcrumbBarMessage;
|
||||
instance->breadcrumbBar->accessKey = 'A';
|
||||
EsTextboxUseBreadcrumbOverlay(instance->breadcrumbBar);
|
||||
EsSpacerCreate(toolbar, ES_FLAGS_DEFAULT, ES_STYLE_TOOLBAR_SPACER);
|
||||
buttonGroup = EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL);
|
||||
ADD_BUTTON_TO_TOOLBAR(commandNewFolder, interfaceString_FileManagerNewFolderToolbarItem, ES_ICON_FOLDER_NEW_SYMBOLIC, 'N', instance->newFolderButton);
|
||||
|
||||
// Status bar:
|
||||
|
||||
EsPanel *statusBar = EsPanelCreate(rootPanel, ES_CELL_H_FILL | ES_PANEL_HORIZONTAL, ES_STYLE_PANEL_STATUS_BAR);
|
||||
instance->status = EsTextDisplayCreate(statusBar, ES_CELL_H_FILL);
|
||||
buttonGroup = EsPanelCreate(statusBar, ES_PANEL_HORIZONTAL);
|
||||
ADD_BUTTON_TO_STATUS_BAR(commandViewDetails, nullptr, ES_ICON_VIEW_LIST_SYMBOLIC, 0, button);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
ADD_BUTTON_TO_STATUS_BAR(commandViewTiles, nullptr, ES_ICON_VIEW_LIST_COMPACT_SYMBOLIC, 0, button);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
ADD_BUTTON_TO_STATUS_BAR(commandViewThumbnails, nullptr, ES_ICON_VIEW_GRID_SYMBOLIC, 0, button);
|
||||
|
||||
// Load initial folder:
|
||||
|
|
|
@ -360,7 +360,7 @@ void _start() {
|
|||
|
||||
EsSpacerCreate(toolbar, ES_CELL_H_FILL);
|
||||
|
||||
EsButton *button = EsButtonCreate(toolbar, ES_BUTTON_DROPDOWN, {}, INTERFACE_STRING(FontBookVariants));
|
||||
EsButton *button = EsButtonCreate(EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL), ES_BUTTON_DROPDOWN, {}, INTERFACE_STRING(FontBookVariants));
|
||||
button->accessKey = 'V';
|
||||
EsButtonOnCommand(button, VariantsPopupCreate);
|
||||
|
||||
|
|
|
@ -721,44 +721,50 @@ void InstanceCreate(EsMessage *message) {
|
|||
EsButton *button;
|
||||
|
||||
EsFileMenuAddToToolbar(toolbar);
|
||||
button = EsButtonCreate(toolbar, ES_BUTTON_DROPDOWN, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorImage));
|
||||
button = EsButtonCreate(EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL), ES_BUTTON_DROPDOWN, ES_STYLE_PUSH_BUTTON_TOOLBAR, INTERFACE_STRING(ImageEditorImage));
|
||||
EsButtonSetIcon(button, ES_ICON_IMAGE_X_GENERIC);
|
||||
button->accessKey = 'I';
|
||||
EsSpacerCreate(toolbar, ES_FLAGS_DEFAULT);
|
||||
EsButtonOnCommand(button, MenuImage);
|
||||
button = EsButtonCreate(toolbar, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_MEDIUM);
|
||||
EsPanel *buttonGroup = EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL);
|
||||
button = EsButtonCreate(buttonGroup);
|
||||
EsCommandAddButton(EsCommandByID(instance, ES_COMMAND_UNDO), button);
|
||||
EsButtonSetIcon(button, ES_ICON_EDIT_UNDO_SYMBOLIC);
|
||||
button->accessKey = 'U';
|
||||
button = EsButtonCreate(toolbar, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_MEDIUM);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(buttonGroup);
|
||||
EsCommandAddButton(EsCommandByID(instance, ES_COMMAND_REDO), button);
|
||||
EsButtonSetIcon(button, ES_ICON_EDIT_REDO_SYMBOLIC);
|
||||
button->accessKey = 'R';
|
||||
|
||||
EsSpacerCreate(toolbar, ES_CELL_FILL);
|
||||
|
||||
button = instance->toolDropdown = EsButtonCreate(toolbar, ES_BUTTON_DROPDOWN, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorPickTool));
|
||||
button = instance->toolDropdown = EsButtonCreate(EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL), ES_BUTTON_DROPDOWN,
|
||||
ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorPickTool));
|
||||
EsButtonSetIcon(button, ES_ICON_DRAW_FREEHAND);
|
||||
EsButtonOnCommand(button, MenuTools);
|
||||
button->accessKey = 'T';
|
||||
|
||||
instance->toolPanel = EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL, ES_STYLE_PANEL_TOOLBAR);
|
||||
instance->toolPanel = EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL);
|
||||
button = EsButtonCreate(instance->toolPanel, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorToolBrush));
|
||||
EsCommandAddButton(&instance->commandBrush, button);
|
||||
EsButtonSetIcon(button, ES_ICON_DRAW_FREEHAND);
|
||||
button->accessKey = 'B';
|
||||
EsSpacerCreate(instance->toolPanel, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(instance->toolPanel, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorToolFill));
|
||||
EsCommandAddButton(&instance->commandFill, button);
|
||||
EsButtonSetIcon(button, ES_ICON_COLOR_FILL);
|
||||
button->accessKey = 'F';
|
||||
EsSpacerCreate(instance->toolPanel, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(instance->toolPanel, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorToolRectangle));
|
||||
EsCommandAddButton(&instance->commandRectangle, button);
|
||||
EsButtonSetIcon(button, ES_ICON_DRAW_RECTANGLE);
|
||||
button->accessKey = 'E';
|
||||
EsSpacerCreate(instance->toolPanel, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(instance->toolPanel, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorToolSelect));
|
||||
EsCommandAddButton(&instance->commandSelect, button);
|
||||
EsButtonSetIcon(button, ES_ICON_OBJECT_GROUP);
|
||||
button->accessKey = 'S';
|
||||
EsSpacerCreate(instance->toolPanel, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(instance->toolPanel, ES_FLAGS_DEFAULT, ES_STYLE_PUSH_BUTTON_TOOLBAR_BIG, INTERFACE_STRING(ImageEditorToolText));
|
||||
EsCommandAddButton(&instance->commandText, button);
|
||||
EsButtonSetIcon(button, ES_ICON_DRAW_TEXT);
|
||||
|
|
|
@ -401,16 +401,12 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
ES_CELL_FILL | ES_PANEL_TABLE | ES_PANEL_HORIZONTAL | ES_PANEL_V_SCROLL_AUTO, &stylePanelMemoryStatistics);
|
||||
EsPanelSetBands(instance->panelMemoryStatistics, 2 /* columns */);
|
||||
|
||||
EsElement *toolbar = EsWindowGetToolbar(window);
|
||||
AddTab(toolbar, DISPLAY_PROCESSES, "Processes", true);
|
||||
AddTab(toolbar, DISPLAY_GENERAL_LOG, "System log");
|
||||
AddTab(toolbar, DISPLAY_MEMORY, "Memory");
|
||||
|
||||
EsSpacerCreate(toolbar, ES_CELL_H_FILL);
|
||||
|
||||
EsButtonOnCommand(EsButtonCreate(toolbar, ES_FLAGS_DEFAULT, 0, "Shutdown"), [] (Instance *, EsElement *, EsCommand *) {
|
||||
EsSystemShowShutdownDialog();
|
||||
});
|
||||
EsElement *buttonGroup = EsPanelCreate(EsWindowGetToolbar(window), ES_PANEL_HORIZONTAL);
|
||||
AddTab(buttonGroup, DISPLAY_PROCESSES, "Processes", true);
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
AddTab(buttonGroup, DISPLAY_GENERAL_LOG, "System log");
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
AddTab(buttonGroup, DISPLAY_MEMORY, "Memory");
|
||||
} else if (message->type == ES_MSG_INSTANCE_DESTROY) {
|
||||
processes.Free();
|
||||
}
|
||||
|
|
|
@ -287,7 +287,7 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
|
||||
EsFileMenuAddToToolbar(toolbarMain);
|
||||
|
||||
button = EsButtonCreate(toolbarMain, ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchOpen));
|
||||
button = EsButtonCreate(EsPanelCreate(toolbarMain, ES_PANEL_HORIZONTAL), ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchOpen));
|
||||
button->accessKey = 'S';
|
||||
EsButtonSetIcon(button, ES_ICON_EDIT_FIND_SYMBOLIC);
|
||||
|
||||
|
@ -296,7 +296,7 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
EsElementFocus(instance->textboxSearch);
|
||||
});
|
||||
|
||||
button = EsButtonCreate(toolbarMain, ES_BUTTON_DROPDOWN, {}, INTERFACE_STRING(CommonFormatPopup));
|
||||
button = EsButtonCreate(EsPanelCreate(toolbarMain, ES_PANEL_HORIZONTAL), ES_BUTTON_DROPDOWN, {}, INTERFACE_STRING(CommonFormatPopup));
|
||||
button->accessKey = 'M';
|
||||
EsButtonSetIcon(button, ES_ICON_FORMAT_TEXT_LARGER_SYMBOLIC);
|
||||
EsCommandAddButton(&instance->commandFormat, button);
|
||||
|
@ -308,7 +308,7 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
|
||||
EsElement *toolbarSearch = instance->toolbarSearch = EsWindowGetToolbar(window, true);
|
||||
|
||||
button = EsButtonCreate(toolbarSearch, ES_FLAGS_DEFAULT, 0);
|
||||
button = EsButtonCreate(EsPanelCreate(toolbarSearch, ES_PANEL_HORIZONTAL), ES_FLAGS_DEFAULT, 0);
|
||||
button->cName = "go back", button->accessKey = 'X';
|
||||
EsButtonSetIcon(button, ES_ICON_GO_FIRST_SYMBOLIC);
|
||||
|
||||
|
@ -316,10 +316,10 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
EsWindowSwitchToolbar(instance->window, instance->toolbarMain, ES_TRANSITION_SLIDE_DOWN);
|
||||
});
|
||||
|
||||
EsPanel *section = EsPanelCreate(toolbarSearch, ES_PANEL_HORIZONTAL);
|
||||
EsTextDisplayCreate(section, ES_FLAGS_DEFAULT, 0, INTERFACE_STRING(CommonSearchPrompt));
|
||||
EsSpacerCreate(toolbarSearch, ES_FLAGS_DEFAULT, 0, 14, 0);
|
||||
|
||||
instance->textboxSearch = EsTextboxCreate(section, ES_FLAGS_DEFAULT, {});
|
||||
EsTextDisplayCreate(toolbarSearch, ES_FLAGS_DEFAULT, 0, INTERFACE_STRING(CommonSearchPrompt));
|
||||
instance->textboxSearch = EsTextboxCreate(toolbarSearch, ES_FLAGS_DEFAULT, {});
|
||||
instance->textboxSearch->cName = "search textbox";
|
||||
instance->textboxSearch->accessKey = 'S';
|
||||
|
||||
|
@ -341,12 +341,15 @@ void ProcessApplicationMessage(EsMessage *message) {
|
|||
return 0;
|
||||
};
|
||||
|
||||
EsSpacerCreate(toolbarSearch, ES_FLAGS_DEFAULT, 0, 7, 0);
|
||||
instance->displaySearch = EsTextDisplayCreate(toolbarSearch, ES_CELL_H_FILL, {}, "");
|
||||
|
||||
button = EsButtonCreate(toolbarSearch, ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchNext));
|
||||
EsPanel *buttonGroup = EsPanelCreate(toolbarSearch, ES_PANEL_HORIZONTAL);
|
||||
button = EsButtonCreate(buttonGroup, ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchNext));
|
||||
button->accessKey = 'N';
|
||||
EsCommandAddButton(&instance->commandFindNext, button);
|
||||
button = EsButtonCreate(toolbarSearch, ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchPrevious));
|
||||
EsSpacerCreate(buttonGroup, ES_CELL_V_FILL, ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR);
|
||||
button = EsButtonCreate(buttonGroup, ES_FLAGS_DEFAULT, {}, INTERFACE_STRING(CommonSearchPrevious));
|
||||
button->accessKey = 'P';
|
||||
EsCommandAddButton(&instance->commandFindPrevious, button);
|
||||
} else if (message->type == ES_MSG_INSTANCE_OPEN) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// TODO Desktop experience:
|
||||
// - Alt+tab.
|
||||
// - Changing wallpaper.
|
||||
//
|
||||
|
||||
// TODO Global shortcuts:
|
||||
// - Restoring closed tabs.
|
||||
// - Switch to window.
|
||||
|
@ -28,7 +28,6 @@
|
|||
// TODO Restarting Desktop if it crashes.
|
||||
// TODO Make sure applications can't delete |Fonts:.
|
||||
// TODO Handle open document deletion.
|
||||
// TODO Store an array of processes for each InstalledApplication.
|
||||
|
||||
#define MSG_SETUP_DESKTOP_UI ((EsMessageType) (ES_MSG_USER_START + 1))
|
||||
|
||||
|
|
|
@ -1029,7 +1029,7 @@ void EsMenuAddCommandsFromToolbar(EsMenu *menu, EsElement *element) {
|
|||
EsMenuAddCommand(menu, button->command->check, button->label, button->labelBytes, button->command);
|
||||
}
|
||||
} else {
|
||||
EsMenuAddCommandsFromToolbar(menu, element);
|
||||
EsMenuAddCommandsFromToolbar(menu, child);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5693,7 +5693,7 @@ void EsFileMenuCreate(EsInstance *_instance, EsElement *element, uint64_t menuFl
|
|||
instance->startupInformation->filePath, instance->startupInformation->filePathBytes);
|
||||
}
|
||||
|
||||
EsButton *renameButton = EsButtonCreate(panel3, ES_BUTTON_TOOLBAR);
|
||||
EsButton *renameButton = EsButtonCreate(EsPanelCreate(panel3, ES_PANEL_HORIZONTAL), ES_BUTTON_TOOLBAR);
|
||||
if (!renameButton) goto show;
|
||||
EsButtonSetIcon(renameButton, ES_ICON_DOCUMENT_EDIT_SYMBOLIC);
|
||||
EsButtonOnCommand(renameButton, FileMenuRename);
|
||||
|
@ -5741,7 +5741,8 @@ void FileMenuCreate(EsInstance *_instance, EsElement *element, EsCommand *) {
|
|||
}
|
||||
|
||||
void EsFileMenuAddToToolbar(EsElement *element, const EsFileMenuSettings *settings) {
|
||||
EsButton *button = EsButtonCreate(element, ES_BUTTON_DROPDOWN, 0, INTERFACE_STRING(CommonFileMenu));
|
||||
EsPanel *buttonGroup = EsPanelCreate(element, ES_PANEL_HORIZONTAL);
|
||||
EsButton *button = EsButtonCreate(buttonGroup, ES_BUTTON_DROPDOWN, 0, INTERFACE_STRING(CommonFileMenu));
|
||||
if (!button) return;
|
||||
button->accessKey = 'F';
|
||||
button->userData = (void *) settings;
|
||||
|
|
|
@ -46,6 +46,16 @@ const EsStyle styleSettingsGroupContainer = {
|
|||
},
|
||||
};
|
||||
|
||||
const EsStyle styleAllSettingsGroupContainer = {
|
||||
.metrics = {
|
||||
.mask = ES_THEME_METRICS_PREFERRED_WIDTH | ES_THEME_METRICS_INSETS | ES_THEME_METRICS_GAP_ALL,
|
||||
.insets = ES_RECT_1(5),
|
||||
.preferredWidth = 400,
|
||||
.gapMajor = 5,
|
||||
.gapMinor = 5,
|
||||
},
|
||||
};
|
||||
|
||||
const EsStyle styleSettingsGroupContainer2 = {
|
||||
.inherit = ES_STYLE_BUTTON_GROUP_CONTAINER,
|
||||
|
||||
|
@ -106,7 +116,7 @@ const EsStyle styleSettingsOverlayPanel = {
|
|||
};
|
||||
|
||||
const EsStyle styleSettingsButton = {
|
||||
.inherit = ES_STYLE_PUSH_BUTTON_TOOLBAR,
|
||||
.inherit = ES_STYLE_PUSH_BUTTON_NORMAL,
|
||||
|
||||
.metrics = {
|
||||
.mask = ES_THEME_METRICS_PREFERRED_WIDTH | ES_THEME_METRICS_PREFERRED_HEIGHT | ES_THEME_METRICS_LAYOUT_VERTICAL
|
||||
|
@ -860,7 +870,8 @@ void InstanceSettingsCreate(EsMessage *message) {
|
|||
{
|
||||
EsElement *toolbar = EsWindowGetToolbar(instance->window);
|
||||
|
||||
EsButton *backButton = EsButtonCreate(toolbar, ES_BUTTON_TOOLBAR | ES_ELEMENT_STICKY_ACCESS_KEY, 0, INTERFACE_STRING(DesktopSettingsBackButton));
|
||||
EsButton *backButton = EsButtonCreate(EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL), ES_BUTTON_TOOLBAR | ES_ELEMENT_STICKY_ACCESS_KEY,
|
||||
0, INTERFACE_STRING(DesktopSettingsBackButton));
|
||||
instance->backButton = backButton;
|
||||
backButton->accessKey = 'A';
|
||||
EsButtonSetIcon(backButton, ES_ICON_GO_HOME_SYMBOLIC);
|
||||
|
@ -869,7 +880,8 @@ void InstanceSettingsCreate(EsMessage *message) {
|
|||
|
||||
EsSpacerCreate(toolbar, ES_CELL_FILL);
|
||||
|
||||
EsButton *undoButton = EsButtonCreate(toolbar, ES_BUTTON_TOOLBAR | ES_ELEMENT_STICKY_ACCESS_KEY, 0, INTERFACE_STRING(DesktopSettingsUndoButton));
|
||||
EsButton *undoButton = EsButtonCreate(EsPanelCreate(toolbar, ES_PANEL_HORIZONTAL), ES_BUTTON_TOOLBAR | ES_ELEMENT_STICKY_ACCESS_KEY,
|
||||
0, INTERFACE_STRING(DesktopSettingsUndoButton));
|
||||
instance->undoButton = undoButton;
|
||||
undoButton->accessKey = 'U';
|
||||
EsButtonSetIcon(undoButton, ES_ICON_EDIT_UNDO_SYMBOLIC);
|
||||
|
@ -886,7 +898,7 @@ void InstanceSettingsCreate(EsMessage *message) {
|
|||
}
|
||||
|
||||
{
|
||||
EsPanel *container = EsPanelCreate(content, ES_CELL_H_SHRINK | ES_PANEL_TABLE | ES_PANEL_HORIZONTAL, &styleSettingsGroupContainer);
|
||||
EsPanel *container = EsPanelCreate(content, ES_CELL_H_SHRINK | ES_PANEL_TABLE | ES_PANEL_HORIZONTAL, &styleAllSettingsGroupContainer);
|
||||
EsPanelSetBands(container, 4);
|
||||
|
||||
EsSort(settingsPages, sizeof(settingsPages) / sizeof(settingsPages[0]), sizeof(settingsPages[0]), [] (const void *_a, const void *_b, EsGeneric) {
|
||||
|
|
|
@ -94,7 +94,7 @@ define ES_STYLE_PANEL_WINDOW_WITH_STATUS_BAR_CONTENT (ES_STYLE_CAST(1483))
|
|||
private define ES_STYLE_SLIDER_POINT (ES_STYLE_CAST(1607))
|
||||
define ES_STYLE_PUSH_BUTTON_DANGEROUS (ES_STYLE_CAST(1345))
|
||||
private define ES_STYLE_TEXTBOX_INLINE (ES_STYLE_CAST(1477))
|
||||
private define ES_STYLE_PUSH_BUTTON_NORMAL (ES_STYLE_CAST(1347))
|
||||
define ES_STYLE_PUSH_BUTTON_NORMAL (ES_STYLE_CAST(1347))
|
||||
define ES_STYLE_TEXTBOX_BORDERED_SINGLE_COMPACT (ES_STYLE_CAST(1403))
|
||||
define ES_STYLE_TEXTBOX_NO_BORDER (ES_STYLE_CAST(1405))
|
||||
define ES_STYLE_TEXTBOX_BORDERED_SINGLE (ES_STYLE_CAST(1401))
|
||||
|
@ -117,3 +117,6 @@ private define ES_STYLE_WINDOW_TAB_INACTIVE (ES_STYLE_CAST(1409))
|
|||
private define ES_STYLE_SCROLLBAR_BAR_VERTICAL (ES_STYLE_CAST(1365))
|
||||
private define ES_STYLE_SCROLLBAR_THUMB_HORIZONTAL (ES_STYLE_CAST(1367))
|
||||
private define ES_STYLE_SCROLLBAR_THUMB_VERTICAL (ES_STYLE_CAST(1369))
|
||||
define ES_STYLE_TOOLBAR_SPACER (ES_STYLE_CAST(5))
|
||||
define ES_STYLE_TOOLBAR_BUTTON_GROUP_SEPARATOR (ES_STYLE_CAST(7))
|
||||
define ES_STYLE_TOOLBAR_SPACER_SMALL (ES_STYLE_CAST(3))
|
||||
|
|
Binary file not shown.
BIN
res/Theme.dat
BIN
res/Theme.dat
Binary file not shown.
|
@ -20,6 +20,7 @@
|
|||
// Prototyping display: previewing state transitions.
|
||||
|
||||
// TODO Additional features:
|
||||
// Inactive and disabled state.
|
||||
// Undoing a delete does not preserve an instance's layer.
|
||||
// Having to link to the end of a conditional object chain is a bit strange.
|
||||
// Automatically cleaning up unused objects.
|
||||
|
@ -3086,8 +3087,8 @@ void ObjectAddCommandInternal(void *cp) {
|
|||
object.type = (ObjectType) (uintptr_t) cp;
|
||||
object.id = ++objectIDAllocator;
|
||||
Property p;
|
||||
int32_t x = canvas->panX + UI_RECT_WIDTH(canvas->bounds) / 2;
|
||||
int32_t y = canvas->panY + UI_RECT_HEIGHT(canvas->bounds) / 2;
|
||||
int32_t x = canvas->panX + UI_RECT_WIDTH(canvas->bounds) / 2 / canvas->zoom;
|
||||
int32_t y = canvas->panY + UI_RECT_HEIGHT(canvas->bounds) / 2 / canvas->zoom;
|
||||
x -= x % CANVAS_ALIGN, y -= y % CANVAS_ALIGN;
|
||||
int32_t w = object.type == OBJ_COMMENT ? 30 : 80;
|
||||
int32_t h = object.type == OBJ_COMMENT ? 10 : 60;
|
||||
|
|
Loading…
Reference in New Issue