kdeaccessibility module as official part of KDE
Luciano Montanaro
mikelima at virgilio.it
Sun Aug 31 09:32:44 BST 2003
On Saturday 30 August 2003 23:33, Gunnar Schmi Dt wrote:
> In the meantime I had some mail exchange with someone from the Center for
> Assistive Technology & Environmental Access. Among other things we talked
> about the upper width limit for the window borders. According to these
> mails we need to allow for window borders up to 30 pixels.
>
I made some experimentation with the CDE style, the patch is at the bottom of
the letter. I increased the limit for the frame width to 30 pixels, and made
the button (and thus the title bar) height dependent on the Window font
setting. This way the title can be made as large as needed. I also added a
rule to make the window title at least as large as the frame, since I think
that if a 30 pixel frame is needed, then buttons must be that large too.
The patch does not center the button icons in the buttons, I'll do that later,
toghether with scaling and an option to draw flat black icons instead of the
embossed ones, as discussed before.
Can someonte test it and tell me if I'm going in the right direction?
> > > The only decoration style that currently allows to change the border
> > > width is the CDE decoration style from kdeartwork, but there title bar
> > > buttons might not be easy to read for people with visual impairments.
> > > Other decoration styles that have a clear separation between the border
> > > and the contents of the window (which is needed when we use wide
> > > borders) are KDE2, Keramik, Laptop and Quarts, so if we decide to make
> > > changes to these five decoration styles I would be happy.
> >
> > I have developed a variation of B2, and also that can change the border
> > width, currently I set an arbitrary maximum of 10 pixels.
> > Check it out at kde-look.org
> >
> > http://kde-look.org/content/show.php?content=6136
>
> That sounds interesting. Can you change the maximum width to 30 pixels?
> That would help certain handicapped users.
I'll work on that, but currently the titlebar height is hard-coded to 20
pixels, and so I must change it to scale with the window font before I can do
that. Otherwise, the border will include te window title.
>
> > I'd be glad if it were included in KDE, either in kde-artwork or as a
> > replacement for the current B2 code. I asked Lubos Lunak, some time ago,
> > and he said I should ask here first. I am asking now - is it ok to add
> > it, and where?
>
> IMHO this style should be included as a replacement of B2 (if no other
> developer complains about that, else in kde-artwork).
>
> > For the title bar button of the CDE style, they could be drawn black on
> > white the way the Irix window manager did - it would improve the CDE look
> > also, in my opinion. If nobody else volunteers, I'd like to try to make
> > these changes to the CDE client.
>
> Possibly with a check box for the style of the title bar buttons? Good
> idea, I vote for doing it.
>
Yes this was my idea.
Now that I see the 30 pixel border, maybe the bevel size should be increased
too, for large frame widths.
Whose needs is this feature designed for? People with low vision or people who
cannot precisely move the pointer on the screen?
> > > An other question is whether we allow the user to specify at which
> > > sides of the window he wants to have those wide borders (as those wide
> > > borders take screen space, the user might want to have the
> > > resize-borders only e.g. at the left and at the bottom of a window).
> >
> > Or at the bottom only, like in the next-step style? Is'nt that enough,
> > since you can resize the window anyhow?
>
> Well, when looking once again into the window decoration styles I see some
> ones that have (visible) borders only at the bottom. If we allow that these
> to have wide borders, then a configuration for borders to be shown only at
> certain sides of the window is not necessary.
>
> Let me resume the discussion so far:
> The question is whether we add the ability to specify the border width
> (from a decoration-style dependent minimum width up to 30 pixels) or if we
> add an extra style for that to kdeaccessibility.
>
> My impression is that most people favor adding the wide border option to
> the existing decoration styles.
>
> If there are no objections I will update the feature plan tomorrow to
> reflect these changes. Which decoration styles do you suggest for the wide
> border option? (I would suggest B2, CDE, KDE2, Keramik, KStep, Laptop,
> Quarts, and RiscOS)
>
> Gunnar Schmi Dt
? cdeclient.patch
Index: cdeclient.cpp
===================================================================
RCS file: /home/kde/kdeartwork/kwin-styles/cde/cdeclient.cpp,v
retrieving revision 1.13
diff -p -u -r1.13 cdeclient.cpp
--- cdeclient.cpp 26 Jul 2003 21:38:49 -0000 1.13
+++ cdeclient.cpp 31 Aug 2003 08:16:33 -0000
@@ -34,7 +34,7 @@ static int s_frameWidth = 5;
static bool titlebarButtonMode = true;
static bool coloredFrame = true;
static Qt::AlignmentFlags textAlignment = Qt::AlignHCenter;
-static const int s_buttonSize = 19;
+static int s_buttonSize = 19;
// These are the line segments for the X on the close button
static const QCOORD closeLLines[] =
@@ -609,8 +609,16 @@ static void readConfig()
// Do not allow malicious users or corrupt config files to
// go past the domain of the valid border sizes.
+
+ // Size limit increased for accessability. LM
if (s_frameWidth < 0) s_frameWidth = 0;
- if (s_frameWidth > 10) s_frameWidth = 10;
+ if (s_frameWidth > 30) s_frameWidth = 30;
+
+ // Force button size to be in a reasonable range.
+ // If the frame width is large, the button size must be large too.
+ s_buttonSize = QFontMetrics(options->font( true )).height() + 2;
+ if (s_buttonSize < 19) s_buttonSize = 19;
+ if (s_buttonSize < s_frameWidth) s_buttonSize = s_frameWidth;
}
}
Index: config/config.cpp
===================================================================
RCS file: /home/kde/kdeartwork/kwin-styles/cde/config/config.cpp,v
retrieving revision 1.6
diff -p -u -r1.6 config.cpp
--- config/config.cpp 30 Jun 2003 08:16:28 -0000 1.6
+++ config/config.cpp 31 Aug 2003 08:16:34 -0000
@@ -32,7 +32,7 @@ CdeConfig::CdeConfig( KConfig* conf, QWi
groupBox = new QVBox( parent );
gbSlider = new QGroupBox( 1, Qt::Horizontal, i18n("Frame &Width"), groupBox
);
- widthSlider = new QSlider( 0, 10, 1, 5, QSlider::Horizontal, gbSlider );
+ widthSlider = new QSlider( 0, 30, 1, 5, QSlider::Horizontal, gbSlider );
widthSlider->setTickmarks( QSlider::Below );
QWhatsThis::add( widthSlider, i18n("By moving this slider back and forth,
you can adjust the width of the "
"window frame to a value of your liking.\n"
More information about the kde-core-devel
mailing list