View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017320 | Scribus | User Interface | public | 2024-11-22 21:26 | 2024-12-08 11:41 |
Reporter | nitramr | Assigned To | nitramr | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | Desktop PC | OS | Ubuntu | OS Version | 24.10 64-bit |
Product Version | 1.7.0.svn | ||||
Target Version | 1.7.0 | Fixed in Version | 1.7.0.svn | ||
Summary | 0017320: Improved View-Toolbar | ||||
Description | The View Toolbar contains Combo boxes that do not allow the user to place the toolbar vertically. In addition, the snap functions can only be switched via menus (main menu or document context menu). The patch includes a rework of the View toolbar. - Image Resolution is now a dropdown button - Color Vision is now a dropdown button - Snap options have also been added | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
toolbar_2024-11-22_01.patch (10,180 bytes)
Index: resources/iconsets/1_7_0/1_7_0.xml =================================================================== --- resources/iconsets/1_7_0/1_7_0.xml (Revision 26446) +++ resources/iconsets/1_7_0/1_7_0.xml (Arbeitskopie) @@ -138,23 +138,31 @@ <icon id="u_group.png" file="16/object-group.svg" /><!-- Outliner --> <icon id="u_undo16.png" file="16/action-undo.svg" /><!-- Barcode --> <icon id="ungroup.png" file="16/object-ungroup.svg" /> + <icon id="add" file="16/action-add.svg" /> <icon id="collapse" file="16/action-chevron-right.svg" /> <icon id="context-menu" file="16/action-menu.svg" /> + <icon id="delete" file="16/action-delete.svg" /> <icon id="delete-selected" file="16/action-delete-selected.svg" /> <icon id="erase-shadow-off" file="16/action-shadow-erase-off.svg" /> <icon id="erase-shadow-on" file="16/action-shadow-erase-on.svg" /> <icon id="expand" file="16/action-chevron-down.svg" /> + <icon id="image-resolution-high" file="16/image-resolution-high.svg" /> + <icon id="image-resolution-low" file="16/image-resolution-low.svg" /> + <icon id="image-resolution-normal" file="16/image-resolution-normal.svg" /> <icon id="inherit-opacity-off" file="16/action-inherit-opacity-off.svg" /> <icon id="inherit-opacity-on" file="16/action-inherit-opacity-on.svg" /> + <icon id="name" file="16/object-name.svg" /> + <icon id="remove" file="16/action-remove.svg" /> <icon id="reset" file="16/action-reload.svg" /> <icon id="reset-style-changes" file="16/action-reload.svg" /> <!-- 16/action-revert-changes.svg --> <icon id="scale-height" file="16/action-scale-height.svg" /> <icon id="scale-width" file="16/action-scale-width.svg" /> + <icon id="settings" file="16/properties-external-tools.svg" /> + <icon id="snap-items" file="16/action-snap-items.svg" /> + <icon id="snap-grid" file="16/action-snap-grid.svg" /> + <icon id="snap-guides" file="16/action-snap-guides.svg" /> <icon id="swap" file="16/action-swap.svg" /> <icon id="toggle-object-coordination" file="16/object-xycoordination.svg" /> - <icon id="context-menu" file="16/action-menu.svg" /> - <icon id="scale-width" file="16/action-scale-width.svg" /> - <icon id="scale-height" file="16/action-scale-height.svg" /> <icon id="whitespace-review-mode" file="16/action-whitespace-review.svg" /> <!-- Alerts --> @@ -230,6 +238,11 @@ <icon id="colorpicker-hatch" file="16/colorpicker-hatch.svg" /> <icon id="colorpicker-pattern" file="16/colorpicker-pattern.svg" /> <icon id="colorpicker-solid" file="16/colorpicker-solid.svg" /> + <icon id="color-vision-colorblind" file="16/color-vision-colorblind.svg" /> + <icon id="color-vision-deuteranopia" file="16/color-vision-deuteranopia.svg" /> + <icon id="color-vision-normal" file="16/color-vision-normal.svg" /> + <icon id="color-vision-protanopia" file="16/color-vision-protanopia.svg" /> + <icon id="color-vision-tritanopia" file="16/color-vision-tritanopia.svg" /> <icon id="mask" file="16/color-mask.svg" /> <icon id="text-color" file="16/text.svg" /> <icon id="text-background-color" file="16/paragraph-align-horizontal-center.svg" /> Index: scribus/CMakeLists_Sources.txt =================================================================== --- scribus/CMakeLists_Sources.txt (Revision 26446) +++ scribus/CMakeLists_Sources.txt (Arbeitskopie) @@ -561,6 +563,7 @@ ui/widgets/color_button.cpp ui/widgets/combo_blendmode.cpp ui/widgets/combo_linestyle.cpp + ui/widgets/dropdown_button.cpp ui/widgets/floatingwindow.cpp ui/widgets/form_widget.cpp ui/widgets/gradientlistbox.cpp Index: scribus/actionmanager.cpp =================================================================== --- scribus/actionmanager.cpp (Revision 26446) +++ scribus/actionmanager.cpp (Arbeitskopie) @@ -708,11 +708,11 @@ name = "viewRulerMode"; scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow)); name = "viewSnapToGrid"; - scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow)); + scrActions->insert(name, new ScrAction("snap-grid", "snap-grid", "", defaultKey(name), mainWindow)); name = "viewSnapToGuides"; - scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow)); + scrActions->insert(name, new ScrAction("snap-guides", "snap-guides", "", defaultKey(name), mainWindow)); name = "viewSnapToElements"; - scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow)); + scrActions->insert(name, new ScrAction("snap-items", "snap-items", "", defaultKey(name), mainWindow)); name = "viewShowContextMenu"; scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow)); name = "showMouseCoordinates"; Index: scribus/ui/viewtoolbar.cpp =================================================================== --- scribus/ui/viewtoolbar.cpp (Revision 26446) +++ scribus/ui/viewtoolbar.cpp (Arbeitskopie) @@ -24,9 +24,11 @@ #include "viewtoolbar.h" #include <QFont> +#include <QToolButton> +#include "iconmanager.h" #include "scraction.h" - +#include "scribusapp.h" #include "scribusdoc.h" #include "scribuscore.h" @@ -36,36 +38,40 @@ int posi = fo.pointSize() - (ScCore->isWinGUI() ? 1 : 2); fo.setPointSize(posi); - previewQualitySwitcher = new QComboBox( this ); + previewQualitySwitcher = new DropdownButton( this ); previewQualitySwitcher->setFocusPolicy(Qt::NoFocus); - previewQualitySwitcher->setFont(fo); +// previewQualitySwitcher->setFont(fo); - visualMenu = new QComboBox( this ); + visualMenu = new DropdownButton( this ); visualMenu->setFocusPolicy(Qt::NoFocus); - visualMenu->setFont(fo); visualMenu->setEnabled(false); - visualMenu->setSizeAdjustPolicy(QComboBox::AdjustToContents); inPreview = visualMenu->isEnabled(); addWidget(previewQualitySwitcher); + addAction(parent->scrActions["viewToggleWhiteSpaceMode"]); addAction(parent->scrActions["viewToggleCMS"]); + addSeparator(); addAction(parent->scrActions["viewPreviewMode"]); addAction(parent->scrActions["viewEditInPreview"]); - addAction(parent->scrActions["viewToggleWhiteSpaceMode"]); addWidget(visualMenu); + addSeparator(); + addAction(parent->scrActions["viewSnapToGrid"]); + addAction(parent->scrActions["viewSnapToGuides"]); + addAction(parent->scrActions["viewSnapToElements"]); languageChange(); + + connect(ScQApp, SIGNAL(iconSetChanged()), this, SLOT(languageChange())); } void ViewToolBar::setDoc(ScribusDoc* doc) { - visualMenu->blockSignals(true); + QSignalBlocker sigColorVision(visualMenu); visualMenu->setCurrentIndex(doc->previewVisual); - visualMenu->blockSignals(false); - previewQualitySwitcher->blockSignals(true); + + QSignalBlocker sigImageRes(previewQualitySwitcher); previewQualitySwitcher->setCurrentIndex(doc->previewQuality()); - previewQualitySwitcher->blockSignals(false); } void ViewToolBar::setViewPreviewMode(bool b) @@ -76,29 +82,24 @@ void ViewToolBar::languageChange() { - visualMenu->blockSignals(true); - int iVM = visualMenu->currentIndex(); + IconManager &im = IconManager::instance(); + + QSignalBlocker sigColorVision(visualMenu); visualMenu->clear(); - visualMenu->addItem(CommonStrings::trVisionNormal); - visualMenu->addItem(CommonStrings::trVisionProtanopia); - visualMenu->addItem(CommonStrings::trVisionDeuteranopia); - visualMenu->addItem(CommonStrings::trVisionTritanopia); - visualMenu->addItem(CommonStrings::trVisionFullColorBlind); - visualMenu->setCurrentIndex(iVM); - visualMenu->blockSignals(false); + visualMenu->addAction(im.loadIcon("color-vision-normal", iconSize()), CommonStrings::trVisionNormal); + visualMenu->addAction(im.loadIcon("color-vision-protanopia", iconSize()), CommonStrings::trVisionProtanopia); + visualMenu->addAction(im.loadIcon("color-vision-deuteranopia", iconSize()), CommonStrings::trVisionDeuteranopia); + visualMenu->addAction(im.loadIcon("color-vision-tritanopia", iconSize()), CommonStrings::trVisionTritanopia); + visualMenu->addAction(im.loadIcon("color-vision-colorblind", iconSize()), CommonStrings::trVisionFullColorBlind); + visualMenu->setToolTip( tr("Select the visual appearance of the display. You can choose between normal and several color blindness forms.")); + visualMenu->setStatusTip( tr("Select display visual appearance")); - previewQualitySwitcher->blockSignals(true); - int iPQM = previewQualitySwitcher->currentIndex(); + QSignalBlocker sigImageRes(previewQualitySwitcher); previewQualitySwitcher->clear(); - previewQualitySwitcher->addItem(tr("High")); - previewQualitySwitcher->addItem(tr("Normal")); - previewQualitySwitcher->addItem(tr("Low")); - previewQualitySwitcher->setCurrentIndex(iPQM); - previewQualitySwitcher->blockSignals(false); - + previewQualitySwitcher->addAction(im.loadIcon("image-resolution-high", iconSize()), tr("High")); + previewQualitySwitcher->addAction(im.loadIcon("image-resolution-normal", iconSize()), tr("Normal")); + previewQualitySwitcher->addAction(im.loadIcon("image-resolution-low", iconSize()), tr("Low")); previewQualitySwitcher->setToolTip( tr("Select the image preview quality")); previewQualitySwitcher->setStatusTip( tr("Select image preview quality")); - visualMenu->setToolTip( tr("Select the visual appearance of the display. You can choose between normal and several color blindness forms.")); - visualMenu->setStatusTip( tr("Select display visual appearance")); } Index: scribus/ui/viewtoolbar.h =================================================================== --- scribus/ui/viewtoolbar.h (Revision 26446) +++ scribus/ui/viewtoolbar.h (Arbeitskopie) @@ -22,6 +22,7 @@ #include "scribusapi.h" #include "ui/sctoolbar.h" +#include "ui/widgets/dropdown_button.h" class ScribusDoc; class ScribusMainWindow; @@ -34,8 +35,9 @@ ViewToolBar(ScribusMainWindow* parent); ~ViewToolBar() {}; - QComboBox *previewQualitySwitcher { nullptr }; - QComboBox *visualMenu { nullptr }; + //QComboBox *previewQualitySwitcher { nullptr }; + DropdownButton *previewQualitySwitcher { nullptr }; + DropdownButton *visualMenu { nullptr }; void setDoc(ScribusDoc *doc); void setViewPreviewMode(bool); @@ -44,6 +46,7 @@ void languageChange(); protected: + bool inPreview { false }; }; |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-11-22 21:26 | nitramr | New Issue | |
2024-11-22 21:26 | nitramr | Status | new => assigned |
2024-11-22 21:26 | nitramr | Assigned To | => nitramr |
2024-11-22 21:26 | nitramr | File Added: files.zip | |
2024-11-22 21:26 | nitramr | File Added: preview.png | |
2024-11-22 21:26 | nitramr | File Added: toolbar_2024-11-22_01.patch | |
2024-11-23 13:30 | cbradney | Status | assigned => resolved |
2024-11-23 13:30 | cbradney | Resolution | open => fixed |
2024-11-23 13:30 | cbradney | Fixed in Version | => 1.7.0.svn |
2024-12-08 11:41 | cbradney | Status | resolved => closed |