[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: [Patch] System Settings : Improve General/Advanced tabs visibility
From: "Nicolas Ternisien" <nicolas.ternisien () gmail ! com>
Date: 2008-03-24 22:12:52
Message-ID: ccba71b50803241512g11c4bf57t8f241bfa230418cf () mail ! gmail ! com
[Download RAW message or body]
New proposal :
http://stuff.forum-software.org/kde/systemsettings-after2.png
On Sun, Mar 23, 2008 at 10:25 PM, Nicolas Ternisien
<nicolas.ternisien@gmail.com> wrote:
> Yes, maybe some flat tab cool be interested. We will test them when
> they are available.
>
> Regards
>
>
>
> On Sun, Mar 23, 2008 at 12:05 PM, pinheiro <nuno@oxygen-icons.org> wrote:
> > A Sunday 23 March 2008 10:07:03, Nicolas Ternisien escreveu:
> >
> > > I'm on this, i will post a new proposal quickly
> > >
> >
> > abut the intire problem, im working with another artist now to solve this and
> > a few more issues i see in oxygen.... like the fact that we need flat tabs.
> > Not sure how fast it will be done has some isses in oxygen now are quite
> > complicated to tackle... like the scrollbars/ progressbars..
> >
> >
> > I seen Peter Penz was interested in helping, that would be very good.
> >
> > --
> >
> > --
> >
> > core oxygen icon designer
> >
>
["system-settings-fixed-tab.patch" (text/x-diff)]
Index: moduletabbar.cpp
===================================================================
--- moduletabbar.cpp (révision 789309)
+++ moduletabbar.cpp (copie de travail)
@@ -29,14 +29,10 @@
: KTabBar(parent)
{
-}
+ QFont modifiedFont = font();
+ modifiedFont.setPointSize( modifiedFont.pointSize() * 1.2 );
+ setFont(modifiedFont);
-QSize ModuleTabBar::tabSizeHint ( int index ) const {
- QSize tabSize = KTabBar::tabSizeHint(index);
-
- tabSize.setWidth( size().width() / count() -2);
-
- return tabSize;
}
#include "moduletabbar.moc"
Index: categories/settings-general.desktop
===================================================================
--- categories/settings-general.desktop (révision 789309)
+++ categories/settings-general.desktop (copie de travail)
@@ -4,6 +4,7 @@
X-KDE-Weight=100
X-KDE-System-Settings-Category=general
X-KDE-System-Settings-Parent-Category=
+Icon=preferences-system
Name=General
Name[ar]=عام
Index: categories/settings-advanced.desktop
===================================================================
--- categories/settings-advanced.desktop (révision 789309)
+++ categories/settings-advanced.desktop (copie de travail)
@@ -4,6 +4,7 @@
X-KDE-Weight=200
X-KDE-System-Settings-Category=advanced
X-KDE-System-Settings-Parent-Category=
+Icon=applications-engineering
Name=Advanced
Name[af]=Gevorderde
Index: moduletabbar.h
===================================================================
--- moduletabbar.h (révision 789309)
+++ moduletabbar.h (copie de travail)
@@ -31,9 +31,6 @@
public:
ModuleTabBar (QWidget *parent=0);
-protected:
-
- virtual QSize tabSizeHint(int index) const;
};
#endif
Index: mainwindow.cpp
===================================================================
--- mainwindow.cpp (révision 789309)
+++ mainwindow.cpp (copie de travail)
@@ -184,7 +184,8 @@
kcsfpm, SLOT(setFilterRegExp(const QString&)));
connect( kcsfpm, SIGNAL(layoutChanged()),
this, SLOT(updateSearchHits()) );
- moduleTabs->addTab(tv, item->service->name() );
+
+ moduleTabs->addTab(tv, SmallIcon(item->service->icon()), item->service->name() );
Index: moduletab.cpp
===================================================================
--- moduletab.cpp (révision 789309)
+++ moduletab.cpp (copie de travail)
@@ -21,7 +21,6 @@
#include "moduletab.h"
#include <QTabBar>
-#include <QFont>
#include <QStackedWidget>
#include <QVBoxLayout>
@@ -45,14 +44,8 @@
d->tabBar = new ModuleTabBar(this);
d->tabBar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
- d->tabBar->setShape(QTabBar::TriangularNorth);
mainLayout->addWidget(d->tabBar);
-
- QFont font = d->tabBar->font();
- font.setBold(true);
- font.setPointSize( font.pointSize() * 1.2 );
- d->tabBar->setFont(font);
-
+
d->stackedWidget = new QStackedWidget(this);
mainLayout->addWidget(d->stackedWidget);
@@ -77,9 +70,10 @@
return d->stackedWidget->currentWidget();
}
-void ModuleTab::addTab(QWidget* view, const QString& name)
+void ModuleTab::addTab(QWidget* view, const QIcon& icon, const QString& name)
{
- d->tabBar->addTab(name);
+ d->tabBar->addTab(icon, name);
+
d->stackedWidget->addWidget(view);
}
Index: moduletab.h
===================================================================
--- moduletab.h (révision 789309)
+++ moduletab.h (copie de travail)
@@ -22,6 +22,7 @@
#include <QList>
#include <QString>
+#include <QIcon>
#include <ktabwidget.h>
#include <ktabbar.h>
@@ -39,7 +40,7 @@
QWidget* currentWidget() const;
- void addTab(QWidget* view, const QString& name);
+ void addTab(QWidget* view, const QIcon& icon, const QString& name);
signals:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic