Bug 152696 - panel cannot be repositioned / resized
Summary: panel cannot be repositioned / resized
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: panel (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 155503 155629 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-22 11:13 UTC by Joseph Wenninger
Modified: 2008-02-13 00:11 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
[PATCH] panel size from plasma-appletsrc (2.40 KB, patch)
2008-01-12 15:40 UTC, Marco Martin
Details
For developers - shows plasma-panel resizing dialog on startup (7.11 KB, patch)
2008-01-13 04:05 UTC, Matej Koubik
Details
nicer version (3.17 KB, patch)
2008-01-13 15:36 UTC, Marco Martin
Details
[PATCH] Improved panel-resize ui (9.88 KB, patch)
2008-01-13 18:16 UTC, Matej Koubik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Wenninger 2007-11-22 11:13:41 UTC
Version:            (using KDE KDE 3.96.0)
Installed from:    Unspecified Linux
OS:                Linux

It is not possible to make the panel use less vertical display space or to move the panel to the top of the screen, or to add another panel there
Comment 1 jamese 2007-12-16 01:55:11 UTC
Yeah, I can confirm this on Kubuntu/7.10 KDE 3.97. Putting the panel on the top of the screen helps if you are 2m tall as it makes for less frequent  visits to the physio - reduction in up and down neck movement! :)

Comment 2 Jason Stubbs 2007-12-16 07:48:36 UTC
Marking as a wish because plasma is new software rather than a kde4 port of kicker & friends.
Comment 3 Alex Merry 2007-12-16 13:24:59 UTC
Resizing, moving, adding and removing panels are all on the to-do list.
Comment 4 jorge salgueiro 2007-12-19 16:04:06 UTC
It should be possible to move plasma panel, to remove it or to have two different instances (in order to have a mac tab) of the panel. Should be more like any plasmoid
Comment 5 Pablo De Napoli 2007-12-31 18:17:27 UTC
It should be consider as a regression compared to 3.5
Comment 6 Michael 2008-01-12 13:14:15 UTC
It's a pain that that didn't make it in the 4.0.0 release. Hopefully it will be added very soon! I like to have a "tiny" taskbar, with no 5px border and just one row of applications.
Comment 7 Marco Martin 2008-01-12 15:40:37 UTC
Created attachment 22961 [details]
[PATCH] panel size from plasma-appletsrc

This is a semi-functional implementation of a configurale panel size, it's
still a little bit rough, in particular it must be configured by editing
plasma-appletsrc and i still didn't get on how to move the panel, so with
horizontal panels it's still aligned to the left and it's aligned to top for
vertical panels.
oh and some applets sets a too big minimum size.
Comment 8 Jason Stubbs 2008-01-12 18:09:21 UTC
*** Bug 155503 has been marked as a duplicate of this bug. ***
Comment 9 Aaron J. Seigo 2008-01-12 20:13:43 UTC
Marco: have you tested this with no plasma-appletsrc? i don't see any default settings in the Panel containment so i wonder how that'd work with a fresh start up. i imagine we might need to have a setSize(48, 48) in the ctor.
Comment 10 Marco Martin 2008-01-12 21:19:36 UTC
without a plasma-appletsrc seems to work rather well both if there is setSize(48, 48) in the constructor or not.
a little side note: if i will commit that i would leave this open until there is a config ui
Comment 11 Aaron J. Seigo 2008-01-13 01:20:30 UTC
Marco: so what size does it get when there is no appletsrc? and is this simply because of the happy circumstance of the kmenu icon being set to 48px or some-such? because i don't see any default size anywhere, which leads me to worry about two cases: one where there are no applets added (try commenting out the applets added to the panel in loadDefaultSetup) and two where there is an applet that decides to get really freaking huge.
Comment 12 Matej Koubik 2008-01-13 04:05:47 UTC
Created attachment 22979 [details]
For developers - shows plasma-panel resizing dialog on startup

[PATCH] I've implemented KConfig configuration of panel resizing (height in
pixels and width in percents of the screen). There is also simple dialog to set
it up, but I'm not sure what's the best way to invoke this dialog (maybe it
would be nice to have this in context menu), so it simply appears automaticaly
on startup. I know this is stupid, but this patch is for hackers and fans, not
for "regular users".
Please, take a look at it and tell me wheather the use of KConfig is correct,
and I'll improve it later.
PS: I'm sorry for my coding-style, but I'm not experienced in KDE developement.
Comment 13 Aaron J. Seigo 2008-01-13 06:10:17 UTC
cool patch; the coding style looks fine. a couple of comments:

* you have a dialog and a kconfigxt object. here's what's really cool: you can skip all the setting of values if you just name the widgets the same as the kconfigxt items and prefix them with kcfg_ .. so instead of heightSpinBox kcfg_Height. 

* i usually don't add the type of widget to the name (heightSpinBox) because then when you change the widget later .. sucks. =) it also doesn't work nicely with kconfigxt

* unfortunately, this uses a separate config file. that's a no-go. sadly kconfigxt hasn't been updated to work with KConfigGroup objects, so that needs to get done in kdelibs.

* i'm really unconvinced we want the width in %. we need a special value for full width, but other than that i think pixel values are easier to manage, tbh.

* anchor points are missing (flush left, flush right, pixel x) as are expanding directions, but as you note this is not a full patch

* you don't delete the config dialog in the dtor so you have a memory leak =)

* interesting gotcha that pretty much everyone misses: if the dialog is already created, then you move desktops, the dialog will show on the desktop it was last on not necessarily the current desktop. it may also be under other windows. you can fix this with:

KWindowSystem:::setOnDesktop(m_dialog->windId(), KWindowSystem::currentDesktop()));
KWindowSystem::activateWindow(m_dialog->windId());

long term we don't want to do this with a dialog anyways, but provide a toolbox on the panel sort of like the desktop one.

thanks for the patch all the same, i hope you enjoyed working on it (that's the best reason to do it, after all =). if you want to keep hacking on plasma stuff (it has a way of being slightly addictive ;) please consider joining the panel-devel@kde.org mailing list if you haven't already.
Comment 14 George Goldberg 2008-01-13 13:19:41 UTC
*** Bug 155629 has been marked as a duplicate of this bug. ***
Comment 15 Marco Martin 2008-01-13 15:36:59 UTC
Created attachment 22996 [details]
nicer version

second attempt, this should be a little bit safer now.
Comment 16 Matej Koubik 2008-01-13 18:16:48 UTC
Created attachment 23000 [details]
[PATCH] Improved panel-resize ui

I've improved the panel-resize ui:
 * memory leak bugfix
 * dialog appears on the current desktop and is active
 * renamed widgets to kcfg_, but i still dont know how to use it with kconfig
automatically.
 * i failed on implementing left/center/right alignment, does anybody know why
it doesnt work? setGeometry(geo) only resizes panel, but doesnt move it.
 * i think width in percents is more friendly to users imagination than in
pixels - they want "full size", "half of a screen" or something like that (not
exactly 600px)
Comment 17 Aaron J. Seigo 2008-01-13 19:55:44 UTC
@Marco: i don't think it's any more safer like that; in fact it's likely to be less safe as it now relies on the proper geometry always being in the config object even when first created or when moved to another screen. seems a bit brittle. i'll ponder how to do this without assumptions.

@Matej: 

* re kconfigxt: you're looking for KConfigDialog. see http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT#Use_and_Dialogs

* left/right/center alignment; yes, that'll take a bit more work indeed as it'll need to move around on geometry changes. while these alignment concepts are familiar to a kde3'er, i also don't think they are really what we want in kde4 anyways. i think we want an anchor point and expansion directions. this will allow easily emulating left/right/center while also allowing for far more interesting and complex arrangements, such as three panels on the same side starting a different locations along the screen. this is related to why i don't think percentages work.

* percentages: so if i say i want a 40% panel because that fits my items but then switch screen resolutions to a smaller screen, should the panel stay big enough to view my items or shrinks and not show them? as screens and resolutions both get bigger, how do we handle the inevitable rounding errors? you're right that people will want "a panel that's half the screen" but we can do this easily by providing "magnetic" points, just as we do with rotating and resizing applets.

anyways ... interesting stuff.. i need to get back to working on my presentations for the release event before i can work on this stuff with the time and attention it deserves.
Comment 18 Marco Martin 2008-01-13 20:50:25 UTC
wouldn't be enough to add some checks like no negative sizes and no more than current screen resolution?
btw best wishes for the release event, hope it will be great :D
Comment 19 Dennis Murczak 2008-01-14 17:01:57 UTC
Would it be possible to implement auto-hide of the panel like in KDE 3.5.x? Some people like to maximize screen estate even on large monitors ...

Since KDE has a good compositing engine now, some nice looking auto hide related effects could also be implemented.
Comment 21 Sebastian Sauer 2008-02-02 03:27:52 UTC
btw, I am sorry for not taking up the work done by Marco or Matej but wrote something on my own. I just like to let you both know, that it was my fault cause I was to lame to look before through bugs.kde.org :-/
Anyway. There is now something in trunk (mainly to have it somehow working) that could be for sure extended/replaced/whatever with something more nice/logical/etc.
Comment 22 Michael 2008-02-02 11:00:05 UTC
So it will be in 4.0.2 but without the menu if I read it right. Looking forward! Is it possible to have a single row? In the screenshot there was a small pannel but everything was still in two rows (tasks, pager, clock with date)
Comment 23 Sebastian Kügler 2008-02-03 00:12:17 UTC
On Saturday 02 February 2008 11:00:06 Michael wrote:
> So it will be in 4.0.2 but without the menu if I read it right. Looking
> forward! Is it possible to have a single row? In the screenshot there was a
> small pannel but everything was still in two rows (tasks, pager, clock with
> date)


If everything fits fine, it'll use one row, if there are too many tasks, it'll 
try to use both rows, but that depends on the height of the panel and the 
taskbar fontsize.
Comment 24 Pablo De Napoli 2008-02-03 00:43:27 UTC
Two comments:

1) Resizing panel is now implemented in svn but the interface is somewhat 
not intuitive: you have to choose the size that you want from a menu:
small, large, etc.
Wouldn't be possible to adjust it dynamically by draging the border 
of the panel by sliding the mouse ? This would be much more intuitive to
users.

2) It would be nice if one could actually hide the panel (like it was
possible in kde 3.5.x)
Comment 25 Maciej Pilichowski 2008-02-03 10:15:53 UTC
Ad.#23) I know that plasma and other parts are new but it would be good to take into account old reports so there would be no need to make the same problematic design decisions again and again.

There is really old report asking for explicit setting of rows. So the user does not set huge/small etc. but -- 1 row, 2 rows, etc.
https://bugs.kde.org/show_bug.cgi?id=77407

But this a bit off-topic since as I can guess taskbar is just an applet for panel, right?
Comment 26 Bernd Steinhauser 2008-02-03 10:32:07 UTC
Have a look at bug 155974, which I opened a few weeks ago.
If you look at the changeset that closed it you will find this line:
"const qreal ratio = 2.25; //maybe this should not be hardcoded"

I already played a bit with it, works pretty well. A setting of 10 at standard panel size will give you two rows of tasks after more than 2 tasks are open.

So it shouldn't be too hard to get what bug 77407 asks for.
Comment 27 Maciej Pilichowski 2008-02-03 12:31:47 UTC
I think this goes in quite opposite way. imho user should set the size of the panel and number of rows.
The font size is the result of those two settings -- not the other way (i.e. number of rows should be not effect of panel size and fontsize).

Comment 28 Jakub Moc 2008-02-03 12:33:39 UTC
+1 on Comment #27
Comment 29 Aaron J. Seigo 2008-02-13 00:11:57 UTC
*** Bug has been marked as fixed ***.