[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Patch for icon margins in kicker
From:       Frank Schmitt <ich () frank-schmitt ! net>
Date:       2005-03-05 12:29:45
Message-ID: m34qfqp96u.fsf () mid ! gehheimdienst ! de
[Download RAW message or body]

"Aaron J. Seigo" <aseigo@kde.org> writes:

> On Friday 04 March 2005 02:54, Frank Schmitt wrote:
>> But I guess you're right and I'll just stick with my patch. If you would
>> however accept a patch which changes the hardcoded value of three pixels
>> to a non-GUI option which defaults to 3 but is changeable in kickerrc, I
>> would be happy to create it.
>
> sure... add it to the buttons group in share/kickerSettings.kcfg... then we 
> can get rid of iconMargin altogether and just reference 
> KickerSettings::iconMargin() directly everywhere ... 

Done. Perhaps this can be included in the 3.4 tree for 3.4.1 as it
enables the user to get the pre 3.4 margins for small panels?

This patch resolves wishlist item 88264.



[Attachment #3 (text/x-patch)]

diff -x '*.moc' --recursive -u ../kdebase-3.4.0/kicker/share/global.cpp \
                kicker/share/global.cpp
--- ../kdebase-3.4.0/kicker/share/global.cpp	2005-02-23 12:26:35.000000000 +0100
+++ kicker/share/global.cpp	2005-03-05 12:21:57.000000000 +0100
@@ -32,6 +32,7 @@
 #include <kservice.h>
 
 #include "global.h"
+#include "kickerSettings.h"
 
 namespace KickerLib
 {
@@ -130,12 +131,7 @@
 
 int maxButtonDim()
 {
-    return (2 * iconMargin()) + KIcon::SizeLarge;
-}
-
-int iconMargin()
-{
-    return 3;
+    return (2 * KickerSettings::iconMargin()) + KIcon::SizeLarge;
 }
 
 QString newDesktopFile(const KURL& url)
diff -x '*.moc' --recursive -u ../kdebase-3.4.0/kicker/share/global.h \
                kicker/share/global.h
--- ../kdebase-3.4.0/kicker/share/global.h	2005-02-23 12:26:35.000000000 +0100
+++ kicker/share/global.h	2005-03-05 12:22:15.000000000 +0100
@@ -45,7 +45,6 @@
  * Pixel sizes for but sizes and margins
  */
 KDE_EXPORT int maxButtonDim();
-KDE_EXPORT int iconMargin();
 
 /*
  * Tint the image to reflect the current color scheme
diff -x '*.moc' --recursive -u ../kdebase-3.4.0/kicker/share/kickerSettings.kcfg \
                kicker/share/kickerSettings.kcfg
--- ../kdebase-3.4.0/kicker/share/kickerSettings.kcfg	2005-02-23 12:26:35.000000000 \
                +0100
+++ kicker/share/kickerSettings.kcfg	2005-03-05 12:29:09.000000000 +0100
@@ -232,6 +232,12 @@
       <default>false</default>
    </entry>
 
+<entry name="IconMargin" key="IconMargin" type="Int" >
+      <label>The margin below and on top of panel icons</label>
+      <default>3</default>
+   </entry>
+
+
 </group>
 
 </kcfg>
diff -x '*.moc' --recursive -u ../kdebase-3.4.0/kicker/share/panelbutton.cpp \
                kicker/share/panelbutton.cpp
--- ../kdebase-3.4.0/kicker/share/panelbutton.cpp	2005-02-21 02:00:59.000000000 +0100
+++ kicker/share/panelbutton.cpp	2005-03-05 12:25:30.000000000 +0100
@@ -624,7 +623,7 @@
     QValueListConstIterator<int> i = sizes.constBegin();
     while (i != sizes.constEnd())// &&
     {
-        if (   (*i) + (2 * KickerLib::iconMargin()) > upperLimit)
+        if (   (*i) + (2 * KickerSettings::iconMargin()) > upperLimit)
         {
             break;
         }


-- 
Did you ever realize how much text fits in eighty columns? If you now consider
that a signature usually consists of up to four lines, this gives you enough
space to spread a tremendous amount of information with your messages. So seize
this opportunity and don't waste your signature with bullshit nobody will read.


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic