View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009518 | Scribus | User Interface | public | 2010-11-23 14:03 | 2011-12-30 16:31 |
Reporter | cezaryece | Assigned To | fschmid | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.3.8 | ||||
Fixed in Version | 1.5.0svn | ||||
Summary | 0009518: [patch] add information about dimmensions of selected item into Status Bar | ||||
Description | For me information about dimensions of selected frame is often very urgent and I want to get it without any special action... So, I have prepare patch for add such information into Status Bar. Patch is for 1.3.9 svn | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
status_bar.patch (4,134 bytes)
Index: Scribus/scribus/scribus.cpp =================================================================== --- Scribus/scribus/scribus.cpp (wersja 15961) +++ Scribus/scribus/scribus.cpp (kopia robocza) @@ -1017,6 +1017,7 @@ void ScribusMainWindow::initStatusBar() { mainWindowStatusLabel = new QLabel( " ", statusBar()); + mainWindowStatusInfLabel= new QLabel( " ", statusBar()); mainWindowProgressBar = new QProgressBar(statusBar()); mainWindowProgressBar->setAlignment(Qt::AlignHCenter); mainWindowProgressBar->setFixedWidth( 100 ); @@ -1027,6 +1028,7 @@ mainWindowYPosDataLabel = new QLabel( " ", statusBar()); statusBar()->addPermanentWidget(mainWindowStatusLabel, 6); + statusBar()->addPermanentWidget(mainWindowStatusInfLabel, 0); statusBar()->addPermanentWidget(mainWindowProgressBar, 0); statusBar()->addPermanentWidget(mainWindowXPosLabel, 0); statusBar()->addPermanentWidget(mainWindowXPosDataLabel, 1); @@ -1061,6 +1063,11 @@ if (mainWindowStatusLabel) mainWindowStatusLabel->setText(newText); } +void ScribusMainWindow::setStatusBarInfText(QString newText) +{ + if (mainWindowStatusLabel) + mainWindowStatusInfLabel->setText(newText); +} //AV to be replaced with Selection::update and listener in PropertiesPalette Index: Scribus/scribus/scribus.h =================================================================== --- Scribus/scribus/scribus.h (wersja 15961) +++ Scribus/scribus/scribus.h (kopia robocza) @@ -267,6 +267,7 @@ void setStatusBarMousePosition(double xp, double yp); void setStatusBarTextPosition(double base, double yp); void setStatusBarInfoText(QString newText); + void setStatusBarInfText(QString newText); bool DoFileClose(); //bool DoSaveClose(); void windowsMenuAboutToShow(); @@ -590,6 +591,7 @@ int ScriptRunning; QLabel* mainWindowStatusLabel; + QLabel* mainWindowStatusInfLabel; QString recentFileMenuName; QString recentPasteMenuName; QString layerMenuName; Index: Scribus/scribus/scribusview.cpp =================================================================== --- Scribus/scribus/scribusview.cpp (wersja 15961) +++ Scribus/scribus/scribusview.cpp (kopia robocza) @@ -1928,6 +1928,32 @@ else undoManager->showObject(Um::NO_UNDO_STACK); } + if ((Doc->m_Selection->width() == 0) && (Doc->m_Selection->height() == 0)) + m_ScMW->setStatusBarInfText( "Page: " + value2String( Doc->currentPage()->width(), Doc->unitIndex(), true, true) + " x " + value2String( Doc->currentPage().height, Doc->unitIndex(), true, true)); + else + { + QString whatSel; + if (Doc->m_Selection->isMultipleSelection()) whatSel = "Multi"; + else + { + PageItem* currItem = Doc->m_Selection->itemAt(); + switch (currItem->itemType()) + { + case 1: whatSel = "T1";break; + case 2: whatSel = tr("Image Frame");break; + case 3: whatSel = "T3";break; + case 4: whatSel = tr("Text Frame");break; + case 5: whatSel = tr("Line");break; + case 6: whatSel = tr("Polygon");break; + case 7: whatSel = tr("Polyline");break; + case 8: whatSel = tr("Text on Path");break; + case 9: whatSel = tr("Latex Frame");break; + case 99: whatSel = tr("Multiple");break; + default: whatSel = "Unknown"; + } + } + m_ScMW->setStatusBarInfText( whatSel + ": " + value2String( Doc->m_Selection->width(), Doc->unitIndex(), true, true) + " x " + value2String( Doc->m_Selection->height(), Doc->unitIndex(), true, true)); + } } bool ScribusView::GetItem(PageItem **currItem, int nr) @@ -1971,6 +1997,7 @@ if (currItem != NULL) updateContents(currItem->getRedrawBounding(scale)); } + m_ScMW->setStatusBarInfText( "Page: " + value2String( Doc->currentPage()->width(), Doc->unitIndex(), true, true) + " x " + value2String( Doc->currentPage().height, Doc->unitIndex(), true, true)); } if (prop && !Doc->m_Selection->signalsDelayed()) emit HaveSel(-1); |
|
please review and commit if ok after 1.3.9 |
|
Reminder sent to: avox, fschmid, jghali please review and comment if this should go in post 1.3.9. Thanks |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-11-23 14:03 | cezaryece | New Issue | |
2010-11-23 14:03 | cezaryece | File Added: status_bar.patch | |
2010-11-23 21:55 |
|
Assigned To | => cbradney |
2010-11-23 21:55 |
|
Status | new => assigned |
2010-11-23 22:04 | cbradney | Assigned To | cbradney => |
2010-11-23 22:04 | cbradney | Status | assigned => new |
2010-11-25 19:52 |
|
Assigned To | => cbradney |
2010-11-25 19:52 |
|
Status | new => assigned |
2010-11-25 19:53 |
|
Note Added: 0024895 | |
2010-11-25 19:54 |
|
Note Added: 0024896 | |
2011-11-22 11:55 | fschmid | Assigned To | cbradney => fschmid |
2011-11-22 12:38 | fschmid | Status | assigned => resolved |
2011-11-22 12:38 | fschmid | Fixed in Version | => 1.5.0svn |
2011-11-22 12:38 | fschmid | Resolution | open => fixed |
2011-12-30 16:31 | cbradney | Status | resolved => closed |