From 1341eb635bcead8a5121469052dd5b1d0bbae4a2 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Fri, 4 Mar 2022 09:07:00 +0800 Subject: [PATCH] Gui: refactor 'Customize -> Toolbars' command list handling By reusing code in DlgCustomKeyboardImp --- src/Gui/DlgToolbars.ui | 569 +++++++++++++++++++++++------------------ 1 file changed, 323 insertions(+), 246 deletions(-) diff --git a/src/Gui/DlgToolbars.ui b/src/Gui/DlgToolbars.ui index c3c122701f..8eebc76576 100644 --- a/src/Gui/DlgToolbars.ui +++ b/src/Gui/DlgToolbars.ui @@ -1,8 +1,5 @@ - - - Gui::Dialog::DlgCustomToolbars @@ -10,270 +7,350 @@ 0 0 576 - 318 + 352 Toolbars - - - 9 - - - 6 - - - - - 0 + + + + + + 0 + 0 + - - 6 - - - - - - - - false - - - - - - - - Qt::Vertical + Qt::Horizontal - - QSizePolicy::Expanding - - - - 33 - 58 - - - - - - - - 0 - - - 6 - - - - - - - + + + 0 - - - - - - - - 0 - - - 6 - - - - - Qt::Vertical + + 0 - - QSizePolicy::Fixed + + 0 - - - 20 - 21 - + + 0 - - - - - - New... - - - - - - - Rename... - - - - - - - Delete - - - - - - - Qt::Vertical - - - - 20 - 152 - - - - - - - - - - true - - - - 30 - 30 - - - - Move right - - - <b>Move the selected item one level down.</b><p>This will also change the level of the parent item.</p> - - - - - - :/icons/button_right.svg - + + + + + + + + 0 + 0 + + + + Category: + + + + + + + + + + false + + + + 1 + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 33 + 58 + + + + + + + + true + + + + 30 + 30 + + + + Move right + + + <b>Move the selected item one level down.</b><p>This will also change the level of the parent item.</p> + + + + + + + :/icons/button_right.svg:/icons/button_right.svg + + + + + + + true + + + + 30 + 30 + + + + Move left + + + <b>Move the selected item one level up.</b><p>This will also change the level of the parent item.</p> + + + + + + + :/icons/button_left.svg:/icons/button_left.svg + + + true + + + false + + + + + + + true + + + + 30 + 30 + + + + Move up + + + <b>Move the selected item up.</b><p>The item will be moved within the hierarchy level.</p> + + + + + + + :/icons/button_up.svg:/icons/button_up.svg + + + + + + + true + + + + 30 + 30 + + + + Move down + + + <b>Move the selected item down.</b><p>The item will be moved within the hierarchy level.</p> + + + + + + + :/icons/button_down.svg:/icons/button_down.svg + + + true + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 33 + 57 + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + 0 + + + + + + + + + 6 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 21 + + + + + + + + New... + + + + + + + Rename... + + + + + + + Delete + + + + + + + Qt::Vertical + + + + 20 + 152 + + + + + + + + - - - - true - - - - 30 - 30 - - - - Move left - - - <b>Move the selected item one level up.</b><p>This will also change the level of the parent item.</p> - - - - - - :/icons/button_left.svg - - - true - - - false - - - - - - - true - - - - 30 - 30 - - - - Move up - - - <b>Move the selected item up.</b><p>The item will be moved within the hierarchy level.</p> - - - - - - :/icons/button_up.svg - - - - - - - true - - - - 30 - 30 - - - - Move down - - - <b>Move the selected item down.</b><p>The item will be moved within the hierarchy level.</p> - - - - - - :/icons/button_down.svg - - - true - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 33 - 57 - - - - - + + + + 0 + 0 + + - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-weight:600;">Note:</span> The changes become active the next time you load the appropriate workbench</p></body></html> + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:MS Shell Dlg 2; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><span style=" font-weight:600;">Note:</span> The changes become active the next time you load the appropriate workbench</p></body></html> - + - + + editCommand + categoryBox + commandTreeWidget + moveActionRightButton + moveActionLeftButton + moveActionUpButton + moveActionDownButton + workbenchBox + toolbarTreeWidget + newButton + renameButton + deleteButton +