[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/lock_logout
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-01-11 23:02:18
Message-ID: 1231714938.265946.30150.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 909646 by aseigo:
allow the buttons to go down to 16px in size; of course, this screws over everyone \
with moderate size panels who'd like normal sized icons. BUG:180278
M +12 -4 lockout.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/lock_logout/lockout.cpp #909645:909646
@@ -41,12 +41,13 @@
#include <windows.h>
#endif // Q_OS_WIN
-#define MINSIZE 48
+static const int MINBUTTONSIZE = 8;
+static const int MARGINSIZE = 2;
LockOut::LockOut(QObject *parent, const QVariantList &args)
: Plasma::Applet(parent, args)
{
- resize(MINSIZE*2,MINSIZE*4);
+ resize(MINBUTTONSIZE, MINBUTTONSIZE * 2 + MARGINSIZE);
}
void LockOut::init()
@@ -76,7 +77,7 @@
switch (formFactor()) {
case Plasma::Vertical:
- if (geometry().width() >= MINSIZE) {
+ if (geometry().width() >= MINBUTTONSIZE * 2 + MARGINSIZE) {
direction = Qt::Horizontal;
ratioToKeep = 2;
} else {
@@ -85,7 +86,7 @@
}
break;
case Plasma::Horizontal:
- if (geometry().height() >= MINSIZE) {
+ if (geometry().height() >= MINBUTTONSIZE * 2 + MARGINSIZE) {
direction = Qt::Vertical;
ratioToKeep = 0.5;
} else {
@@ -96,6 +97,13 @@
default:
direction = Qt::Vertical;
}
+
+ if (direction == Qt::Horizontal) {
+ setMinimumSize(MINBUTTONSIZE * 2 + MARGINSIZE, MINBUTTONSIZE);
+ } else {
+ setMinimumSize(MINBUTTONSIZE, MINBUTTONSIZE * 2 + MARGINSIZE);
+ }
+
if (direction != m_layout->orientation()) {
m_layout->setOrientation(direction);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic