View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007740 | Scribus | Graphics / Image Frames | public | 2009-01-21 10:56 | 2009-01-25 20:01 |
Reporter | OssiLehtinen | Assigned To | subik | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 8.10 |
Product Version | 1.3.5svn | ||||
Fixed in Version | 1.3.5svn | ||||
Summary | 0007740: Request+Implementation: An ui switch for changing the preview quality of all image frames. | ||||
Description | Changing the preview resolution of images repeatedly can be useful, as one can preview the document with full resolution to acquire proper picture of the document, but do the heavy lifting with lower resolution previews to accommodate a more 'snappy' response. This can be accomplished via Document Setup->Tools->Image Frame Properties, but in the long run this is rather cumbersome, if one wants to often switch between preview resolutions. Hence a switch in the default ui for this would really come in handy. To support my suggestion, I made an implementation of the idea, which can be found in the diff attached. It places a switch-menu in at the bottom area of the main window with options full/normal/low and switching it changes the preview resolution of all the image previews. The location of the switch isn't that well thought out, and should anyways be decided by someone in charge of the ui (also I'm not sure how I'd move it around...). One shortcoming. When the property is set via Document Setup->Tools->Image Frame Properties, the selector menu status isn't updated accordingly. | ||||
Tags | No tags attached. | ||||
Patch | |||||
2009-01-21 12:08
|
prevresswitch_2.diff (5,693 bytes)
Index: Scribus/scribus/scribusview.h =================================================================== --- Scribus/scribus/scribusview.h (revision 13064) +++ Scribus/scribus/scribusview.h (working copy) @@ -129,6 +129,7 @@ #endif QComboBox *layerMenu; //Menu for layers at bottom of view QComboBox *unitSwitcher; //Menu for units at bottom of view + QComboBox *previewQualitySwitcher; //Menu for image preview quality QComboBox *visualMenu; /** Dokument zu dem die Seite gehoert */ ScribusDoc * const Doc; @@ -285,6 +286,7 @@ void GotoLa(int l); void GotoPage(int Seite); void ChgUnit(int art); + void ChgPQ(int art); void SetCPo(double x, double y); void SetCCPo(double x, double y); void editExtendedImageProperties(); Index: Scribus/scribus/scribusview.cpp =================================================================== --- Scribus/scribus/scribusview.cpp (revision 13064) +++ Scribus/scribus/scribusview.cpp (working copy) @@ -199,6 +199,13 @@ int maxUindex = unitGetMaxIndex() - 2; for (int i = 0; i <= maxUindex; ++i) unitSwitcher->addItem(unitGetStrFromIndex(i)); + previewQualitySwitcher = new QComboBox( this ); + previewQualitySwitcher->setFocusPolicy(Qt::NoFocus); + previewQualitySwitcher->setFont(fo); + previewQualitySwitcher->addItem("High"); + previewQualitySwitcher->addItem("Normal"); + previewQualitySwitcher->addItem("Low"); + setCurrentComboItem(previewQualitySwitcher, "Normal"); zoomSpinBox = new ScrSpinBox( 10, 3200, this, 6 ); zoomSpinBox->setTabAdvance(false); zoomSpinBox->setFont(fo); @@ -318,6 +325,7 @@ connect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(GotoPa(int))); connect(layerMenu, SIGNAL(activated(int)), this, SLOT(GotoLa(int))); connect(unitSwitcher, SIGNAL(activated(int)), this, SLOT(ChgUnit(int))); + connect(previewQualitySwitcher, SIGNAL(activated(int)), this, SLOT(ChgPQ(int))); connect(previewToolbarButton, SIGNAL(clicked()), this, SLOT(togglePreview())); connect(cmsToolbarButton, SIGNAL(clicked()), this, SLOT(toggleCMS())); connect(visualMenu, SIGNAL(activated(int)), this, SLOT(switchPreviewVisual(int))); @@ -358,6 +366,7 @@ previewToolbarButton->setToolTip(""); layerMenu->setToolTip( tr("Select the current layer")); unitSwitcher->setToolTip( tr("Select the current unit")); + previewQualitySwitcher->setToolTip( tr("Select the image preview quality")); visualMenu->setToolTip(""); cmsToolbarButton->setToolTip( tr("Enable/disable Color Management")); idCmsAdjustMenu->setText( tr("Configure CMS...")); @@ -2817,6 +2826,12 @@ horizRuler->repaint(); } +void ScribusView::ChgPQ(int art) +{ + Doc->allItems_ChangePreviewResolution(art); + DrawNew(); +} + void ScribusView::GotoPa(int Seite) { Deselect(); Index: Scribus/scribus/scribusdoc.cpp =================================================================== --- Scribus/scribus/scribusdoc.cpp (revision 13064) +++ Scribus/scribus/scribusdoc.cpp (working copy) @@ -7040,6 +7040,50 @@ } } +void ScribusDoc::allItems_ChangePreviewResolution(int id) +{ + + bool found=false; + + for (int c=0; c<DocItems.count(); ++c) + { + PageItem *currItem = DocItems.at(c); + if (currItem!=NULL) + if (currItem->asImageFrame()) + { + currItem->pixm.imgInfo.lowResType = id; + if (!found) + found=true; + } + } + for (int c=0; c<MasterItems.count(); ++c) + { + PageItem *currItem = MasterItems.at(c); + if (currItem!=NULL) + if (currItem->asImageFrame()) + { + currItem->pixm.imgInfo.lowResType = id; + if (!found) + found=true; + } + } + for (int c=0; c<FrameItems.count(); ++c) + { + PageItem *currItem = FrameItems.at(c); + if (currItem!=NULL) + if (currItem->asImageFrame()) + { + currItem->pixm.imgInfo.lowResType = id; + if (!found) + found=true; + } + } + + if (!found) //No image frames in the current selection! + return; + recalcPicturesRes(); + changed(); +} void ScribusDoc::itemSelection_ClearItem(Selection* customSelection) { Index: Scribus/scribus/scribuswin.cpp =================================================================== --- Scribus/scribus/scribuswin.cpp (revision 13064) +++ Scribus/scribus/scribuswin.cpp (working copy) @@ -60,6 +60,7 @@ statusFrameLayout->setMargin(0); statusFrameLayout->setSpacing(0); m_View->unitSwitcher->setParent(statusFrame); + m_View->previewQualitySwitcher->setParent(statusFrame); m_View->layerMenu->setParent(statusFrame); m_View->zoomOutToolbarButton->setParent(statusFrame); m_View->zoomDefaultToolbarButton->setParent(statusFrame); @@ -70,6 +71,7 @@ m_View->previewToolbarButton->setParent(statusFrame); m_View->visualMenu->setParent(statusFrame); statusFrameLayout->addWidget(m_View->unitSwitcher); + statusFrameLayout->addWidget(m_View->previewQualitySwitcher); statusFrameLayout->addWidget(m_View->zoomSpinBox); statusFrameLayout->addWidget(m_View->zoomOutToolbarButton); statusFrameLayout->addWidget(m_View->zoomDefaultToolbarButton); Index: Scribus/scribus/scribusdoc.h =================================================================== --- Scribus/scribus/scribusdoc.h (revision 13064) +++ Scribus/scribus/scribusdoc.h (working copy) @@ -1127,6 +1127,7 @@ void itemSelection_ToggleImageShown(); void itemSelection_TogglePrintEnabled(); void itemSelection_ChangePreviewResolution(int id); + void allItems_ChangePreviewResolution(int id); void itemSelection_ClearItem(Selection* customSelection=0); //! Delete the items in the current selection. When force is true, we do not warn the user and make SE happy too. Force is used from @sa Page::restorePageItemCreation void itemSelection_DeleteItem(Selection* customSelection=0, bool forceDeletion=false); |
|
One thing added, so ignore the first diff. Added a line to initialize the switch to "Normal". Perhaps the initial setting should be read from preferences though. |
|
cool feature (imho). Patch was applied in SVN rev. 0013075. I've appended code comments. And Preferences (doc/global) changes are promoted to the GUI combobox. Test it please. I see one issue (usability) - user can be confused what is this combobox for (I know there is tooltip, but...). Any thoughts how to improve it? |
|
Great! A silly question: How do I check out revision 13075? I tried svn co --revision 13075 svn://scribus.info/Scribus/trunk/Scribus But it says there's no such revision. I agree with the usability issue. One one hand, one needs to check the tool tips for the other things too, but that's not really an excuse. One thing that makes this case worse, is that for example text "Normal" is less self-explanatory than e.g. pt for the units choice. One could make the text more verbose, like "Image Preview Resolution Normal", but that would make the menu far too big imho. It might be helpful just to move it next to the Enable/Disable Preview mode switch. It would be better associated with 'similar' controls. |
|
wait for private to public svn sync (I don't know when it will be next. Try in next hour), please. Moving the combo near the preview mode looks good |
|
Everything seems to be ok here. |
|
cool then. I'm closing this issue - we can move the combobox later. After we'll get more feedback from users. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-01-21 10:56 | OssiLehtinen | New Issue | |
2009-01-21 10:56 | OssiLehtinen | File Added: prevresswitch.diff | |
2009-01-21 12:08 | OssiLehtinen | File Added: prevresswitch_2.diff | |
2009-01-21 12:09 | OssiLehtinen | Note Added: 0020946 | |
2009-01-21 12:27 | subik | Status | new => assigned |
2009-01-21 12:27 | subik | Assigned To | => subik |
2009-01-21 13:05 | subik | File Deleted: prevresswitch.diff | |
2009-01-21 13:14 | subik | Note Added: 0020948 | |
2009-01-21 13:14 | subik | Status | assigned => feedback |
2009-01-21 13:39 | OssiLehtinen | Note Added: 0020950 | |
2009-01-21 13:59 | subik | Note Added: 0020951 | |
2009-01-21 14:50 | OssiLehtinen | Note Added: 0020954 | |
2009-01-25 19:49 | subik | Note Added: 0020992 | |
2009-01-25 19:49 | subik | Status | feedback => resolved |
2009-01-25 19:49 | subik | Fixed in Version | => 1.3.5svn |
2009-01-25 19:49 | subik | Resolution | open => fixed |
2009-01-25 20:01 | cbradney | Status | resolved => closed |
2015-09-17 20:10 | Kunda | Category | Graphics / Image Frames => Graphics/Img Frames |
2015-09-17 20:11 | Kunda | Category | Graphics/Img Frames => Graphics / Image Frames |