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. svn path=/trunk/kdebase/kwin/; revision=322458
This commit is contained in:
parent
dd55eaf1fa
commit
5e3bd8b2c8
2 changed files with 54 additions and 1 deletions
|
@ -38,7 +38,9 @@
|
||||||
//===============================================================
|
//===============================================================
|
||||||
|
|
||||||
enum Buttons{ BtnMenu=0, BtnOnAllDesktops, BtnSpacer, BtnHelp,
|
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 ];
|
QListBoxPixmap* buttons[ BtnCount ];
|
||||||
QPixmap* pixmaps[ BtnCount ];
|
QPixmap* pixmaps[ BtnCount ];
|
||||||
QPixmap* miniSpacer;
|
QPixmap* miniSpacer;
|
||||||
|
@ -114,6 +116,9 @@ static int btnIndex( char btn )
|
||||||
case 'L':
|
case 'L':
|
||||||
return BtnShade;
|
return BtnShade;
|
||||||
break;
|
break;
|
||||||
|
case 'R':
|
||||||
|
return BtnResize;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -1; // Not found...
|
return -1; // Not found...
|
||||||
}
|
}
|
||||||
|
@ -149,6 +154,7 @@ ButtonSource::ButtonSource( QWidget* parent, const char* name )
|
||||||
pixmaps[ BtnAboveOthers ] = new QPixmap( button_above_others_xpm );
|
pixmaps[ BtnAboveOthers ] = new QPixmap( button_above_others_xpm );
|
||||||
pixmaps[ BtnBelowOthers ] = new QPixmap( button_below_others_xpm );
|
pixmaps[ BtnBelowOthers ] = new QPixmap( button_below_others_xpm );
|
||||||
pixmaps[ BtnShade ] = new QPixmap( button_shade_xpm );
|
pixmaps[ BtnShade ] = new QPixmap( button_shade_xpm );
|
||||||
|
pixmaps[ BtnResize ] = new QPixmap( button_resize_xpm );
|
||||||
miniSpacer = new QPixmap( titlebarspacer_xpm );
|
miniSpacer = new QPixmap( titlebarspacer_xpm );
|
||||||
|
|
||||||
// Add all possible button/spacer types to the list box.
|
// Add all possible button/spacer types to the list box.
|
||||||
|
@ -157,6 +163,7 @@ ButtonSource::ButtonSource( QWidget* parent, const char* name )
|
||||||
buttons[ BtnAboveOthers ] = new QListBoxPixmap( this, *pixmaps[BtnAboveOthers], i18n("Keep Above Others") );
|
buttons[ BtnAboveOthers ] = new QListBoxPixmap( this, *pixmaps[BtnAboveOthers], i18n("Keep Above Others") );
|
||||||
buttons[ BtnBelowOthers ] = new QListBoxPixmap( this, *pixmaps[BtnBelowOthers], i18n("Keep Below Others") );
|
buttons[ BtnBelowOthers ] = new QListBoxPixmap( this, *pixmaps[BtnBelowOthers], i18n("Keep Below Others") );
|
||||||
buttons[ BtnShade ] = new QListBoxPixmap( this, *pixmaps[BtnShade], i18n("Shade") );
|
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[ BtnSpacer ] = new QListBoxPixmap( this, *pixmaps[BtnSpacer], i18n("Spacer") );
|
||||||
buttons[ BtnHelp ] = new QListBoxPixmap( this, *pixmaps[BtnHelp], i18n("Help") );
|
buttons[ BtnHelp ] = new QListBoxPixmap( this, *pixmaps[BtnHelp], i18n("Help") );
|
||||||
buttons[ BtnMinimize ] = new QListBoxPixmap( this, *pixmaps[BtnMinimize], i18n("Minimize") );
|
buttons[ BtnMinimize ] = new QListBoxPixmap( this, *pixmaps[BtnMinimize], i18n("Minimize") );
|
||||||
|
@ -190,6 +197,8 @@ void ButtonSource::hideAllButtons()
|
||||||
takeItem( buttons[BtnAboveOthers] );
|
takeItem( buttons[BtnAboveOthers] );
|
||||||
if (index( buttons[BtnBelowOthers] )!= -1)
|
if (index( buttons[BtnBelowOthers] )!= -1)
|
||||||
takeItem( buttons[BtnBelowOthers] );
|
takeItem( buttons[BtnBelowOthers] );
|
||||||
|
if (index( buttons[BtnResize] )!= -1)
|
||||||
|
takeItem( buttons[BtnResize] );
|
||||||
if (index( buttons[BtnShade] )!= -1)
|
if (index( buttons[BtnShade] )!= -1)
|
||||||
takeItem( buttons[BtnShade] );
|
takeItem( buttons[BtnShade] );
|
||||||
if (index( buttons[BtnHelp] ) != -1)
|
if (index( buttons[BtnHelp] ) != -1)
|
||||||
|
@ -217,6 +226,8 @@ void ButtonSource::showAllButtons()
|
||||||
insertItem( buttons[BtnAboveOthers] );
|
insertItem( buttons[BtnAboveOthers] );
|
||||||
if (index( buttons[BtnBelowOthers] )== -1)
|
if (index( buttons[BtnBelowOthers] )== -1)
|
||||||
insertItem( buttons[BtnBelowOthers] );
|
insertItem( buttons[BtnBelowOthers] );
|
||||||
|
if (index( buttons[BtnResize] )== -1)
|
||||||
|
insertItem( buttons[BtnResize] );
|
||||||
if (index( buttons[BtnShade] )== -1)
|
if (index( buttons[BtnShade] )== -1)
|
||||||
insertItem( buttons[BtnShade] );
|
insertItem( buttons[BtnShade] );
|
||||||
if (index( buttons[BtnHelp] ) == -1)
|
if (index( buttons[BtnHelp] ) == -1)
|
||||||
|
@ -301,6 +312,8 @@ char ButtonSource::convertToChar( QString s )
|
||||||
return 'B';
|
return 'B';
|
||||||
else if (s == i18n("Shade"))
|
else if (s == i18n("Shade"))
|
||||||
return 'L';
|
return 'L';
|
||||||
|
else if (s == i18n("Resize"))
|
||||||
|
return 'R';
|
||||||
else
|
else
|
||||||
return '?';
|
return '?';
|
||||||
}
|
}
|
||||||
|
|
|
@ -469,4 +469,44 @@ 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
|
// vim: ts=4
|
||||||
|
|
Loading…
Reference in a new issue