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

List:       kde-commits
Subject:    kdebase/kwin/kcmkwin/kwindecoration
From:       Luciano Montanaro <mikelima () cirulla ! net>
Date:       2004-06-21 13:13:49
Message-ID: 20040621131349.318631775 () office ! kde ! org
[Download RAW message or body]

CVS commit by montanaro: 

I'll take Lubos' answer as an "OK". 
So, I'll add what will probably be the least useful feature of KDE3.3:
The support for a "resize" button in the titlebar. 
Perhaps the accessibility people could find a use for this, though.


  M +14 -1     buttons.cpp   1.11
  M +40 -0     pixmaps.h   1.7


--- kdebase/kwin/kcmkwin/kwindecoration/buttons.cpp  #1.10:1.11
@@ -39,5 +39,7 @@
 
 enum Buttons{ BtnMenu=0, BtnOnAllDesktops, BtnSpacer, BtnHelp,
-                          BtnMinimize, BtnMaximize, BtnClose, BtnAboveOthers, \
BtnBelowOthers, BtnShade, BtnCount }; +                          BtnMinimize, \
BtnMaximize, BtnClose,  +                          BtnAboveOthers, BtnBelowOthers, 
+                          BtnShade, BtnResize, BtnCount };
 QListBoxPixmap* buttons[ BtnCount ];
 QPixmap*                pixmaps[ BtnCount ];
@@ -115,4 +117,7 @@ static int btnIndex( char btn )
                         return BtnShade;
                         break;
+                case 'R':
+                        return BtnResize;
+                        break;
                 default:
                         return -1;      // Not found...
@@ -150,4 +155,5 @@ ButtonSource::ButtonSource( QWidget* par
         pixmaps[ BtnBelowOthers ]       = new QPixmap( button_below_others_xpm );
         pixmaps[ BtnShade ]     = new QPixmap( button_shade_xpm );
+        pixmaps[ BtnResize ]    = new QPixmap( button_resize_xpm );
         miniSpacer                              = new QPixmap( titlebarspacer_xpm );
 
@@ -158,4 +164,5 @@ ButtonSource::ButtonSource( QWidget* par
         buttons[ BtnBelowOthers ]       = new QListBoxPixmap( this, \
                *pixmaps[BtnBelowOthers], i18n("Keep Below Others") );
         buttons[ BtnShade ]             = new QListBoxPixmap( this, \
*pixmaps[BtnShade], i18n("Shade") ); +        buttons[ BtnResize ]    = new \
                QListBoxPixmap( this, *pixmaps[BtnResize], i18n("Resize") );
         buttons[ BtnSpacer ]    = new QListBoxPixmap( this, *pixmaps[BtnSpacer], \
                i18n("Spacer") );
         buttons[ BtnHelp ]              = new QListBoxPixmap( this, \
*pixmaps[BtnHelp], i18n("Help") ); @@ -191,4 +198,6 @@ void \
ButtonSource::hideAllButtons()  if (index( buttons[BtnBelowOthers] )!= -1)
                 takeItem( buttons[BtnBelowOthers] );
+        if (index( buttons[BtnResize] )!= -1)
+                takeItem( buttons[BtnResize] );
         if (index( buttons[BtnShade] )!= -1)
                 takeItem( buttons[BtnShade] );
@@ -218,4 +227,6 @@ void ButtonSource::showAllButtons()
         if (index( buttons[BtnBelowOthers] )== -1)
                 insertItem( buttons[BtnBelowOthers] );
+        if (index( buttons[BtnResize] )== -1)
+                insertItem( buttons[BtnResize] );
         if (index( buttons[BtnShade] )== -1)
                 insertItem( buttons[BtnShade] );
@@ -302,4 +313,6 @@ char ButtonSource::convertToChar( QStrin
         else if (s == i18n("Shade"))
                 return 'L';
+        else if (s == i18n("Resize"))
+                return 'R';
         else
                 return '?';

--- kdebase/kwin/kcmkwin/kwindecoration/pixmaps.h  #1.6:1.7
@@ -470,3 +470,43 @@ const char * button_shade_xpm[] = {
 "))))))))))))))))))))"};
 
+/* XPM */
+const char * button_resize_xpm[] = {
+"20 20 16 1",
+"       c None",
+".      c #F3F3F3",
+"+      c #F2F2F2",
+"@      c #F1F1F1",
+"#      c #FFFFFF",
+"$      c #F0F0F0",
+"%      c #6E6E6E",
+"&      c #EFEFEF",
+"*      c #EEEEEE",
+"=      c #EDEDED",
+"-      c #ECECEC",
+";      c #EBEBEB",
+">      c #EAEAEA",
+",      c #E9E9E9",
+"'      c #E8E8E8",
+")      c #E7E7E7",
+"....................",
+"....................",
+"++++++++++++++++++++",
+"@@@@@@@@@@@@@@@@@@@@",
+"@@@@###########@@@@@",
+"$$$$#%%%%%%%%%%$$$$$",
+"&&&&#%...#%..#%&&&&&",
+"&&&&#%...#%..#%&&&&&",
+"****#%...#%..#%*****",
+"====#%####%..#%=====",
+"====#%%%%%%..#%=====",
+"----#%.......#%-----",
+";;;;#%.......#%;;;;;",
+";;;;#%########%;;;;;",
+">>>>#%%%%%%%%%%>>>>>",
+",,,,,,,,,,,,,,,,,,,,",
+",,,,,,,,,,,,,,,,,,,,",
+"''''''''''''''''''''",
+"))))))))))))))))))))",
+"))))))))))))))))))))"};
+
 // vim: ts=4


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

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