perlpanel-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Perlpanel-devel] Panel Sizing and Resizing: 2 diffs (resend with di


From: Gavin Brown
Subject: Re: [Perlpanel-devel] Panel Sizing and Resizing: 2 diffs (resend with diffs attached)
Date: Sat, 02 Oct 2004 16:38:21 +0100

> 1> The button widget seems (to my unexperienced eye) to require a border
> of several pixels around the icon it contains.  This isn't very
> efficient for icon sizes < Large.  perlpanel-eventbox.diff changes
> several applets I use to use EventBoxes instead of buttons as a proof of
> concept.

The border on your buttons is probably theme-specific, and may be
fixable by editing your gtkrc to remove the border.

I have looked at moving away from GtkButtons for some panel applets in
the past. The main problem with using just an event box is that it
doesn't provide any visual feedback. When a button is clicked there's a
visible indication that you've done something. If everything clickable
on the panel was an event box, it'd be hard to work out whether the
button click actually worked, which would result in the user clicking
something multiple times.

If you look at the launcher icons on the gnome panel, the icon is
hilighted when the pointer moves over them, and when they're clicked,
the icon depresses slightly. That would be a pretty good solution to the
button border problem.

> 2> Adjust the width of the panel to correspond to current needs.  If an
> applet defines a width_request sub, then use the request width,
> otherwise use the current width.  perlpanel-resize.diff changes
> PerlPanel.pm to resize the panel every second, and adds a width_request
> sub to Tasklist.  This should be a configurable if it's supported at all.

This is quite a neat idea, but I think the implementation is wrong.
Instead of running a timeout every second, and querying a special method
in the applet, you could connect a signal to the  'size-allocate' and
'size-request' signals, and get the required width of the panel using
$widget->allocation->width on all the children of the panel.

I did a bit of playing around with this, and got quite close to having a
dynamically resizing panel, centered on the edge of the screen.

Gavin.

-- 
Gavin Brown
e: address@hidden
w: http://jodrell.net/
PGP/GPG key ID: 891D8FCA

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]