View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009356 | Scribus | User Interface | public | 2010-09-15 12:59 | 2024-10-23 18:42 |
Reporter | ale | Assigned To | nitramr | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.0 | ||||
Fixed in Version | 1.7.0.svn | ||||
Summary | 0009356: [PATCH] icons for the properties palette | ||||
Description | here a set of icons for the properties palette... can we haz tabz, now? | ||||
Tags | indigodock | ||||
Patch | Yes | ||||
|
|
|
pp_tabs.diff (18,512 bytes)
Index: scribus/ui/propertiespalette.cpp =================================================================== --- scribus/ui/propertiespalette.cpp (révision 15491) +++ scribus/ui/propertiespalette.cpp (copie de travail) @@ -171,7 +171,7 @@ f.setPointSize(f.pointSize()-1); setFont(f); - TabStack = new QToolBox( this ); + TabStack = new QTabWidget( this ); page = new QWidget( TabStack ); pageLayout = new QVBoxLayout( page ); @@ -318,7 +318,7 @@ QSpacerItem* spacer13 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); pageLayout->addItem( spacer13 ); - idXYZItem = TabStack->addItem( page, "X, Y, &Z" ); + idXYZItem = TabStack->addTab( page, "X, Y, &Z" ); page_2 = new QWidget( TabStack ); pageLayout_2 = new QVBoxLayout( page_2 ); @@ -430,7 +430,7 @@ QSpacerItem* spacer6 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); pageLayout_2->addItem( spacer6 ); - idShapeItem = TabStack->addItem( page_2, "&Shape" ); + idShapeItem = TabStack->addTab( page_2, "&Shape" ); page_group = new QWidget(TabStack); page_group_layout = new QVBoxLayout( page_group ); @@ -509,7 +509,7 @@ QSpacerItem* spacerTr2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); page_group_layout->addItem( spacerTr2 ); - idGroupItem = TabStack->addItem(page_group, "Groups"); + idGroupItem = TabStack->addTab(page_group, "Groups"); page_3 = new QWidget( TabStack ); pageLayout_3 = new QVBoxLayout( page_3 ); @@ -855,7 +855,7 @@ Distance2Item = TextTree->addWidget( tr("Path Text Properties"), Distance2); pageLayout_3->addWidget(TextTree); - idTextItem=TabStack->addItem( page_3, "&Text" ); + idTextItem=TabStack->addTab( page_3, "&Text" ); page_4 = new QWidget( TabStack ); pageLayout_4 = new QVBoxLayout( page_4 ); @@ -1008,7 +1008,7 @@ QSpacerItem* spacer9 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ); pageLayout_4->addItem( spacer9 ); - idImageItem=TabStack->addItem( page_4, "&Image" ); + idImageItem=TabStack->addTab( page_4, "&Image" ); page_5 = new QWidget( TabStack ); pageLayout_5 = new QVBoxLayout( page_5 ); @@ -1122,7 +1122,7 @@ pageLayout_5b->addWidget(TLines); TabStack3->addWidget( page_5b ); pageLayout_5->addWidget( TabStack3 ); - idLineItem=TabStack->addItem( page_5, "&Line" ); + idLineItem=TabStack->addTab( page_5, "&Line" ); page_6 = new QWidget( TabStack ); pageLayout_6 = new QVBoxLayout( page_6 ); @@ -1130,7 +1130,7 @@ pageLayout_6->setMargin( 0 ); Cpal = new Cpalette(page_6); pageLayout_6->addWidget( Cpal ); - idColorsItem = TabStack->addItem(page_6, "&Colors" ); + idColorsItem = TabStack->addTab(page_6, "&Colors" ); page_7 = new QWidget( TabStack ); pageLayout_7 = new QVBoxLayout( page_7 ); @@ -1138,7 +1138,7 @@ pageLayout_7->setMargin( 0 ); Tpal = new Tpalette(page_7); pageLayout_7->addWidget( Tpal ); - idTransparencyItem = TabStack->addItem(page_7, "&Transparency" ); + idTransparencyItem = TabStack->addTab(page_7, "&Transparency" ); MpalLayout->addWidget( TabStack ); @@ -1262,6 +1262,16 @@ connect(minGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setMinGlyphExtension()) ); connect(maxGlyphExtSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setMaxGlyphExtension()) ); + + TabStack->setTabIcon(idXYZItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("xyz"))); + TabStack->setTabIcon(idTextItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("text"))); + TabStack->setTabIcon(idImageItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("image"))); + TabStack->setTabIcon(idShapeItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("shape"))); + TabStack->setTabIcon(idLineItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("line"))); + TabStack->setTabIcon(idColorsItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("colors"))); + TabStack->setTabIcon(idGroupItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("group"))); + TabStack->setTabIcon(idTransparencyItem, loadIcon(QString("icon_scribus_%1_tab.png").arg("transparency"))); + HaveItem = false; Xpos->setValue(0); Ypos->setValue(0); @@ -1272,10 +1282,9 @@ TabStack3->setCurrentIndex(0); TabStack2->setCurrentIndex(0); for (int ws = 1; ws < 8; ++ws) - TabStack->setItemEnabled(ws, false); + TabStack->widget(ws)->setEnabled( false); TabStack->setCurrentIndex(0); TabStack->widget(0)->setEnabled(false); - TabStack->setItemEnabled(0, false); StrokeIcon->setEnabled(false); TxStroke->setEnabled(false); PM1->setEnabled(false); @@ -1510,9 +1519,9 @@ imageRotation->setValue(0); RoundRect->setValue(0); for (int ws = 1; ws < 8; ++ws) - TabStack->setItemEnabled(ws, false); + TabStack->widget(ws)->setEnabled( false); TabStack->widget(0)->setEnabled(false); - TabStack->setItemEnabled(idXYZItem, false); + TabStack->widget(idXYZItem)->setEnabled( false); Cpal->ChooseGrad(0); } @@ -1815,13 +1824,13 @@ LayerGroup->setEnabled(!setter); if ((CurItem->isGroupControl) || ((CurItem->Groups.count() != 0) && (!CurItem->isSingleSel))) { - TabStack->setItemEnabled(idXYZItem, true); - TabStack->setItemEnabled(idShapeItem, false); - TabStack->setItemEnabled(idGroupItem, true); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idColorsItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); + TabStack->widget(idXYZItem)->setEnabled( true); + TabStack->widget(idShapeItem)->setEnabled( false); + TabStack->widget(idGroupItem)->setEnabled( true); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idColorsItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); if (CurItem->FrameType == 0) SCustom2->setIcon(SCustom2->getIconPixmap(0)); if (CurItem->FrameType == 1) @@ -1840,7 +1849,7 @@ textFlowUsesImageClipping2->setEnabled(false); } else - TabStack->setItemEnabled(idGroupItem, false); + TabStack->widget(idGroupItem)->setEnabled( false); if (CurItem->asPathText()) { TabStack2->setCurrentIndex(0); @@ -1998,14 +2007,14 @@ #ifdef HAVE_OSG if (CurItem->asOSGFrame()) { - TabStack->setItemEnabled(idXYZItem, true); - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idGroupItem, false); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idColorsItem, true); - TabStack->setItemEnabled(idTransparencyItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); + TabStack->widget(idXYZItem)->setEnabled( true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idGroupItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idColorsItem)->setEnabled( true); + TabStack->widget(idTransparencyItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); Rotation->setEnabled(false); RoundRect->setEnabled(false); EditShape->setEnabled(false); @@ -2014,14 +2023,14 @@ #endif if (CurItem->asSymbolFrame()) { - TabStack->setItemEnabled(idXYZItem, true); - TabStack->setItemEnabled(idShapeItem, false); - TabStack->setItemEnabled(idGroupItem, true); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idColorsItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idTransparencyItem, false); + TabStack->widget(idXYZItem)->setEnabled( true); + TabStack->widget(idShapeItem)->setEnabled( false); + TabStack->widget(idGroupItem)->setEnabled( true); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idColorsItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idTransparencyItem)->setEnabled( false); if (CurItem->FrameType == 0) SCustom2->setIcon(SCustom2->getIconPixmap(0)); if (CurItem->FrameType == 1) @@ -2085,17 +2094,17 @@ Height->setEnabled(true); Rotation->setEnabled(true); for (int ws = 1; ws < 8; ++ws) - TabStack->setItemEnabled(ws, false); + TabStack->widget(ws)->setEnabled( false); TabStack->widget(0)->setEnabled(true); - TabStack->setItemEnabled(idXYZItem, true); + TabStack->widget(idXYZItem)->setEnabled( true); NameEdit->setEnabled(false); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idColorsItem, true); - TabStack->setItemEnabled(idTransparencyItem, true); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idColorsItem)->setEnabled( true); + TabStack->widget(idTransparencyItem)->setEnabled( true); if (HaveItem && CurItem) { if ((CurItem->isGroupControl) || ((CurItem->Groups.count() != 0) && (!CurItem->isSingleSel))) - TabStack->setItemEnabled(idGroupItem, true); + TabStack->widget(idGroupItem)->setEnabled( true); } FlipH->setCheckable( false ); FlipV->setCheckable( false ); @@ -2124,9 +2133,9 @@ RotationGroup->setEnabled(true); visID = TabStack->currentIndex(); TabStack->widget(0)->setEnabled(true); - TabStack->setItemEnabled(idXYZItem, true); - TabStack->setItemEnabled(idColorsItem, true); - TabStack->setItemEnabled(idTransparencyItem, true); + TabStack->widget(idXYZItem)->setEnabled( true); + TabStack->widget(idColorsItem)->setEnabled( true); + TabStack->widget(idTransparencyItem)->setEnabled( true); //CB If Toggle is not possible, then we need to enable it so we can turn it off //It then gets reset below for items where its valid if ((nr>4) && (nr<9)) @@ -2159,9 +2168,9 @@ Rotation->setValue(0); RoundRect->setValue(0); for (int ws = 1; ws < 8; ++ws) - TabStack->setItemEnabled(ws, false); + TabStack->widget(ws)->setEnabled( false); TabStack->widget(0)->setEnabled(false); - TabStack->setItemEnabled(idXYZItem, false); + TabStack->widget(idXYZItem)->setEnabled( false); Cpal->ChooseGrad(0); LevelTxt->setText(" "); break; @@ -2171,14 +2180,14 @@ #ifdef HAVE_OSG if (i->asOSGFrame()) { - TabStack->setItemEnabled(idXYZItem, true); - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idGroupItem, false); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idColorsItem, true); - TabStack->setItemEnabled(idTransparencyItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); + TabStack->widget(idXYZItem)->setEnabled( true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idGroupItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idColorsItem)->setEnabled( true); + TabStack->widget(idTransparencyItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); Rotation->setEnabled(false); RoundRect->setEnabled(false); EditShape->setEnabled(false); @@ -2187,10 +2196,10 @@ else { #endif - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, true); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( true); + TabStack->widget(idLineItem)->setEnabled( true); if ((!i->ClipEdited) && ((i->FrameType == 0) || (i->FrameType == 2))) RoundRect->setEnabled(!i->locked()); else @@ -2202,20 +2211,20 @@ #endif break; case PageItem::TextFrame: - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idTextItem, true); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idTextItem)->setEnabled( true); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( true); if ((!i->ClipEdited) && ((i->FrameType == 0) || (i->FrameType == 2))) RoundRect->setEnabled(!i->locked()); else RoundRect->setEnabled(false); break; case PageItem::Line: - TabStack->setItemEnabled(idShapeItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( true); RoundRect->setEnabled(false); LineMode->setEnabled(true); RotationGroup->setEnabled(false); @@ -2223,37 +2232,37 @@ case PageItem::ItemType1: case PageItem::ItemType3: case PageItem::Polygon: - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( true); if ((!i->ClipEdited) && ((i->FrameType == 0) || (i->FrameType == 2))) RoundRect->setEnabled(!i->locked()); else RoundRect->setEnabled(false); break; case PageItem::PolyLine: - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( true); RoundRect->setEnabled(false); break; case PageItem::PathText: - TabStack->setItemEnabled(idShapeItem, true); - TabStack->setItemEnabled(idTextItem, true); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, true); + TabStack->widget(idShapeItem)->setEnabled( true); + TabStack->widget(idTextItem)->setEnabled( true); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( true); RoundRect->setEnabled(false); break; case PageItem::Symbol: - TabStack->setItemEnabled(idShapeItem, false); - TabStack->setItemEnabled(idTextItem, false); - TabStack->setItemEnabled(idImageItem, false); - TabStack->setItemEnabled(idLineItem, false); - TabStack->setItemEnabled(idGroupItem, true); - TabStack->setItemEnabled(idColorsItem, false); - TabStack->setItemEnabled(idTransparencyItem, false); + TabStack->widget(idShapeItem)->setEnabled( false); + TabStack->widget(idTextItem)->setEnabled( false); + TabStack->widget(idImageItem)->setEnabled( false); + TabStack->widget(idLineItem)->setEnabled( false); + TabStack->widget(idGroupItem)->setEnabled( true); + TabStack->widget(idColorsItem)->setEnabled( false); + TabStack->widget(idTransparencyItem)->setEnabled( false); if ((!i->ClipEdited) && ((i->FrameType == 0) || (i->FrameType == 2))) RoundRect->setEnabled(!i->locked()); else @@ -2261,7 +2270,7 @@ break; } } - if (TabStack->isItemEnabled(currentTab) && (TabStack->currentIndex() != currentTab)) + if (TabStack->isTabEnabled(currentTab) && (TabStack->currentIndex() != currentTab)) TabStack->setCurrentIndex(currentTab); updateGeometry(); repaint(); @@ -4853,15 +4862,32 @@ { setWindowTitle( tr("Properties")); - TabStack->setItemText(idXYZItem, tr("X, Y, &Z")); - TabStack->setItemText(idTextItem, tr("&Text")); - TabStack->setItemText(idImageItem, tr("&Image")); - TabStack->setItemText(idShapeItem, tr("&Shape")); - TabStack->setItemText(idLineItem, tr("&Line")); - TabStack->setItemText(idColorsItem, tr("&Colors")); - TabStack->setItemText(idGroupItem, tr("&Group")); - TabStack->setItemText(idTransparencyItem, tr("&Transparency")); +// TabStack->setTabText(idXYZItem, tr("X, Y, &Z")); +// TabStack->setTabText(idTextItem, tr("&Text")); +// TabStack->setTabText(idImageItem, tr("&Image")); +// TabStack->setTabText(idShapeItem, tr("&Shape")); +// TabStack->setTabText(idLineItem, tr("&Line")); +// TabStack->setTabText(idColorsItem, tr("&Colors")); +// TabStack->setTabText(idGroupItem, tr("&Group")); +// TabStack->setTabText(idTransparencyItem, tr("&Transparency")); + TabStack->setTabToolTip(idXYZItem, tr("X, Y, Z")); + TabStack->setTabToolTip(idTextItem, tr("Text")); + TabStack->setTabToolTip(idImageItem, tr("Image")); + TabStack->setTabToolTip(idShapeItem, tr("Shape")); + TabStack->setTabToolTip(idLineItem, tr("Line")); + TabStack->setTabToolTip(idColorsItem, tr("Colors")); + TabStack->setTabToolTip(idGroupItem, tr("Group")); + TabStack->setTabToolTip(idTransparencyItem, tr("Transparency")); + TabStack->setTabText(idXYZItem, ""); + TabStack->setTabText(idTextItem, ""); + TabStack->setTabText(idImageItem, ""); + TabStack->setTabText(idShapeItem, ""); + TabStack->setTabText(idLineItem, ""); + TabStack->setTabText(idColorsItem, ""); + TabStack->setTabText(idGroupItem, ""); + TabStack->setTabText(idTransparencyItem, ""); + NameGroup->setTitle( tr("Name")); GeoGroup->setTitle( tr("Geometry")); xposLabel->setText( tr("&X-Pos:")); @@ -5399,7 +5425,7 @@ m_ScMW->view->RCenter = FPoint(gx, gy + gh); else if (bp == 4) m_ScMW->view->RCenter = FPoint(gx + gw, gy + gh); - TabStack->setItemEnabled(idShapeItem, false); + TabStack->widget(idShapeItem)->setEnabled( false); } void PropertiesPalette::handleShapeEdit2() Index: scribus/ui/propertiespalette.h =================================================================== --- scribus/ui/propertiespalette.h (révision 15491) +++ scribus/ui/propertiespalette.h (copie de travail) @@ -28,7 +28,7 @@ class QSpinBox; class QStackedWidget; class QStackedWidget; -class QToolBox; +class QTabWidget; class QVBoxLayout; class QWidget; @@ -508,7 +508,7 @@ QToolButton* ZTop; QToolButton* ZBottom; - QToolBox* TabStack; + QTabWidget* TabStack; QStackedWidget* TabStack2; QStackedWidget* TabStack3; |
|
The patch should apply nicely against rev. 15491. icons have to be generated with something like: for i in *.svg ; do inkscape -z --file=$i --export-png=`basename $i .svg`.png --export-width=16 ; done and put in your Scribus icons directory |
|
Would be really nice to see how this looks like. Screenshot ? |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-09-15 12:59 | ale | New Issue | |
2010-09-15 12:59 | ale | File Added: pp_icons_tabs_draft_20100817.zip | |
2010-09-15 19:12 | cbradney | Assigned To | => pierremarchand |
2010-09-15 19:12 | cbradney | Status | new => assigned |
2010-10-04 18:49 | pierremarchand | File Added: pp_tabs.diff | |
2010-10-04 18:51 | pierremarchand | Note Added: 0024611 | |
2014-08-18 20:27 | Kunda | Assigned To | pierremarchand => |
2014-08-18 20:27 | Kunda | Summary | icons for the properties palette => [PATCH] icons for the properties palette |
2014-10-24 23:00 | Kunda | Patch | => Yes |
2015-07-26 12:49 | Kunda | Note Added: 0035905 | |
2016-04-01 19:25 | Kunda | Tag Attached: indigodock | |
2024-10-22 20:52 | cbradney | Assigned To | => nitramr |
2024-10-22 20:52 | cbradney | Status | assigned => resolved |
2024-10-22 20:52 | cbradney | Resolution | open => fixed |
2024-10-22 20:52 | cbradney | Fixed in Version | => 1.7.0.svn |
2024-10-23 18:42 | cbradney | Status | resolved => closed |