This is a multi-part message in MIME format.

--===============1901649369==
content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C6228B.AEC66F4B"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6228B.AEC66F4B
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi, I'm trying to find out if I can change the default behavior of the =
maximize button for a KMainWindow. I've googled and searched archives, =
but haven't found the solution.

I have a toolbar at the top of my desktop which I don't want to be =
covered when I maximize my application. I would like the maximize =
button to make the application fill the rest of the screen, just not the =
toolbar.

I have tried to use QWidget::setMaximumHeight() and QWidget =
::setMaximumSize(), but if I use these commands, the maximize button =
just disappears from the system menu.

Currently, I am catching the resize and move events, determining if the =
window is covering the toolbar and, if so, repositioning/resizing the =
window so it doesn't.

This works, but is inelegant. The problems with that solution are:
1) The events occur after the maximize, so there's a screen flicker as =
the app maximizes, then gets resized and repositioned.
2) The window isn't "maximized" anymore after I resize and reposition =
it, so I can't use the "restore" button to move the window back to it's =
old position.

I know this should be possible because the system taskbar has an option =
under "Hiding" that says "Allow other windows to cover the panel" and if =
I maximize when this option is checked, the app resizes and covers the =
taskbar. If the option is not selected, the app will resize slightly =
smaller, so that it doesn't cover the taskbar. I just have yet to =
figure out how this works.

I'm also not sure if this is something I have to do inside my app or if =
this is something that I have to do with KWin.

Thanks for the help.

Mike Granger


------_=_NextPart_001_01C6228B.AEC66F4B
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable




charset=3Diso-8859-1">
6.0.6617.47">
Can you change the size of a maximized window?




FACE=3D"Arial">Hi, I’m trying to find out if I can change the =
default behavior of the maximize button for a K
LANG=3D"en-us"> FACE=3D"Arial">M COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">ainWindow. LANG=3D"en-us">  =
I’ve googled and searched archives, but haven
LANG=3D"en-us">’t =
found the solution.



FACE=3D"Arial">I have a toolbar at the top of my desktop which I =
don’t want to be covered when I maximize my application.  I =
would like the maximize button to
=
make the application =
fill the rest of the screen, just not the toolbar.
LANG=3D"en-us">



FACE=3D"Arial">I have tried COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">to use LANG=3D"en-us"> FACE=3D"Arial">QWidget:: COLOR=3D"#000000" SIZE=3D2 =
FACE=3D"Arial">setMaximumHeight
COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">() LANG=3D"en-us"> =
and
FACE=3D"Arial">Q COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">W LANG=3D"en-us"> FACE=3D"Arial">idget COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> ::setMaximumSize(), but if I =
use these commands, the maximize button just disappears from the system =
menu.



FACE=3D"Arial">Currently, I am catching the resize LANG=3D"en-us"> and move =
events, determining if the window is covering the toolbar =
and
FACE=3D"Arial">, if so, COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> =
repositioning
SIZE=3D2 FACE=3D"Arial">/resizing LANG=3D"en-us"> the =
window
SIZE=3D2 FACE=3D"Arial">so COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> it doesn LANG=3D"en-us"> FACE=3D"Arial">’t COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">. LANG=3D"en-us">



FACE=3D"Arial">This works, but is inelegant.  LANG=3D"en-us"> The =
problems with that solution are
COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">:



FACE=3D"Arial">1)      LANG=3D"en-us"> SIZE=3D2 FACE=3D"Arial">T COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">he events occur after =
the
FACE=3D"Arial">maximize, so there’s a screen flicker as the app =
maximizes, then gets resized and repositioned.



FACE=3D"Arial">2)      LANG=3D"en-us"> The =
window isn’t “maximized” anymore =
after
SIZE=3D2 FACE=3D"Arial">I resize and reposition it, =
so
FACE=3D"Arial">I COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> LANG=3D"en-us"> FACE=3D"Arial">can’t use the “restore” button to move =
the window back to it’s old position.



FACE=3D"Arial">I know this should be possible because =
the
FACE=3D"Arial">system COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial">taskbar has an =
option
SIZE=3D2 FACE=3D"Arial">under “Hiding” LANG=3D"en-us"> that =
says “
SIZE=3D2 FACE=3D"Arial">Allow other windows to cover the panel” =
and if I maximize when this option is checked, the
LANG=3D"en-us"> FACE=3D"Arial">app COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> resizes and covers the =
taskbar.  If the option is not selected, the
LANG=3D"en-us"> FACE=3D"Arial">app COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> will resize slightly smaller, =
so that it doesn’t cover the taskbar.  I just have yet to =
figure out how this works.



FACE=3D"Arial">I’m also not sure if this is something I have to do =
inside my app or if this is something that
LANG=3D"en-us"> FACE=3D"Arial">I COLOR=3D"#000000" SIZE=3D2 FACE=3D"Arial"> LANG=3D"en-us"> have to =
do with KWin.



FACE=3D"Arial">Thanks for the help.



FACE=3D"Arial">Mike Granger LANG=3D"en-us">





------_=_NextPart_001_01C6228B.AEC66F4B--

--===============1901649369==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


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


--===============1901649369==--