[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-accessibility
Subject: [Kde-accessibility] Sizes for the window borders
From: Gunnar Schmi Dt <gunnar () schmi-dt ! de>
Date: 2003-09-23 15:05:26
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Just a few minutes ago I added the two decoration sizes BorderVeryHuge and
BorderOversized to the list of known border sizes (as the first part of my
entry "Add an option to allow wide borders to some of the window decoration
styles" in the feature plan).
I also modified the Web decoration from kdebase and the KStep and Plastik
decorations from kdeartwork to respect these new border sizes. (They are the
only ones that currently both allow to specify a border size and are ported
to the new kwin API). I will add the possibility to set the border size to
the other decorations in the next few days.
Currently the Web and Plastik styles use the pixel sizes 4,8,12,18,27,40
pixels for normal, large, very large, huge, very huge, and oversized borders.
As the standard size for the KStep decoration is larger, all of its border
sizes are larger. It uses the sizes 6, 9, 14, 21, 32, and 48.
Currently the KCM for the window decoration does not allow to set the border
size. However, I have prepared a patch that adds a combo box for the sizes to
that KCM. This patch is a quick hack (it does not check whether the actual
decoration supports different border sizes), but it works. Is it OK to commit
that patch until we have a clean solution for the GUI?
Gunnar Schmi Dt
- --
Co-maintainer of the KDE Accessibility Project
Maintainer of the kdeaccessibility package
http://accessibility.kde.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE/cGE7sxZ93p+gHn4RAtklAJ9WIM4chtVq/VHy/mkuEyvR8gPGjwCgzTjd
Pvyum5cXjrFqAeHASZOEgIk=
=k75r
-----END PGP SIGNATURE-----
["sizecombo.diff" (text/x-diff)]
Index: kcmkwin/kwindecoration/kwindecoration.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/kcmkwin/kwindecoration/kwindecoration.cpp,v
retrieving revision 1.46
diff -u -p -r1.46 kwindecoration.cpp
--- kcmkwin/kwindecoration/kwindecoration.cpp 19 Sep 2003 11:14:41 -0000 1.46
+++ kcmkwin/kwindecoration/kwindecoration.cpp 23 Sep 2003 14:48:09 -0000
@@ -110,6 +110,19 @@ KWinDecorationModule::KWinDecorationModu
pluginLayout->addWidget(pluginSettingsLine);
pluginLayout->addWidget(pluginConfigWidget);
+ QHBox *hbox2 = new QHBox(pluginPage);
+ QLabel *borderSizeLabel = new QLabel( i18n("Border &width"), hbox2 );
+ borderSizeList = new KComboBox( hbox2 );
+ borderSizeLabel->setBuddy (borderSizeList);
+ borderSizeList->insertItem (i18n("Tiny"), KDecorationDefines::BorderTiny);
+ borderSizeList->insertItem (i18n("Normal"), KDecorationDefines::BorderNormal);
+ borderSizeList->insertItem (i18n("Large"), KDecorationDefines::BorderLarge);
+ borderSizeList->insertItem (i18n("Very large"), KDecorationDefines::BorderVeryLarge);
+ borderSizeList->insertItem (i18n("Huge"), KDecorationDefines::BorderHuge);
+ borderSizeList->insertItem (i18n("Very huge"), KDecorationDefines::BorderVeryHuge);
+ borderSizeList->insertItem (i18n("Oversized"), KDecorationDefines::BorderOversized);
+ pluginLayout->addWidget(hbox2);
+
// Page 2 (Button Selector)
QVBox* buttonPage = new QVBox( tabWidget );
buttonPage->setSpacing( KDialog::spacingHint() );
@@ -156,6 +169,7 @@ KWinDecorationModule::KWinDecorationModu
connect( decorationList, SIGNAL(activated(const QString&)), SLOT(slotSelectionChanged()) );
connect( decorationList, SIGNAL(activated(const QString&)),
SLOT(slotChangeDecoration(const QString&)) );
+ connect( borderSizeList, SIGNAL(activated(const QString&)), SLOT(slotSelectionChanged()) );
connect( cbUseCustomButtonPositions, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
connect(cbUseCustomButtonPositions, SIGNAL(toggled(bool)), buttonBox, SLOT(setEnabled(bool)));
connect( cbShowToolTips, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
@@ -327,15 +341,15 @@ void KWinDecorationModule::resetPlugin(
connect( this, SIGNAL(pluginLoad(KConfig*)), pluginObject, SLOT(load(KConfig*)) );
connect( this, SIGNAL(pluginSave(KConfig*)), pluginObject, SLOT(save(KConfig*)) );
connect( this, SIGNAL(pluginDefaults()), pluginObject, SLOT(defaults()) );
- pluginSettingsLbl->show();
- pluginSettingsLine->show();
+ // pluginSettingsLbl->show();
+ // pluginSettingsLine->show();
pluginConfigWidget->show();
return;
}
}
- pluginSettingsLbl->hide();
- pluginSettingsLine->hide();
+ // pluginSettingsLbl->hide();
+ // pluginSettingsLine->hide();
pluginConfigWidget->hide();
}
@@ -392,6 +406,8 @@ void KWinDecorationModule::readConfig( K
for(i = 0; i < dropSite->buttonsRight.length(); i++)
buttonSource->hideButton( dropSite->buttonsRight[i].latin1() );
+ borderSizeList->setCurrentItem(conf->readNumEntry("BorderSize", KDecorationDefines::BorderNormal));
+
setChanged(false);
}
@@ -418,6 +434,8 @@ void KWinDecorationModule::writeConfig(
oldLibraryName = currentLibraryName;
currentLibraryName = libName;
+ conf->writeEntry("BorderSize", borderSizeList->currentItem() );
+
// We saved, so tell kcmodule that there have been no new user changes made.
setChanged(false);
}
@@ -484,6 +502,8 @@ void KWinDecorationModule::defaults()
buttonSource->hideButton('I');
buttonSource->hideButton('A');
buttonSource->hideButton('X');
+
+ borderSizeList->setCurrentItem(KDecorationDefines::BorderNormal);
// Set plugin defaults
emit pluginDefaults();
Index: kcmkwin/kwindecoration/kwindecoration.h
===================================================================
RCS file: /home/kde/kdebase/kwin/kcmkwin/kwindecoration/kwindecoration.h,v
retrieving revision 1.17
diff -u -p -r1.17 kwindecoration.h
--- kcmkwin/kwindecoration/kwindecoration.h 19 Sep 2003 11:14:41 -0000 1.17
+++ kcmkwin/kwindecoration/kwindecoration.h 23 Sep 2003 14:48:09 -0000
@@ -114,6 +114,7 @@ class KWinDecorationModule : public KCMo
QLabel* pluginSettingsLbl;
QFrame* pluginSettingsLine;
QWidget* pluginConfigWidget;
+ KComboBox* borderSizeList;
QString currentLibraryName;
QString oldLibraryName;
QObject* (*allocatePlugin)( KConfig* conf, QWidget* parent );
_______________________________________________
kde-accessibility mailing list
kde-accessibility@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-accessibility
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic