Awn

First icon on launcher larger

Bug #128973 reported by Andrew Starr-Bochicchio on 2007-07-28
10
Affects Status Importance Assigned to Milestone
Awn
Medium
Miika-Petteri Matikainen

Bug Description

The first icon on the launcher appears to be slightly larger than the rest.

Does not seem to effect applets placed in front of the launcher applet.

See this thread for more information:

http://www.planetblur.org/hosted/awnforum/index.php?shard=forum&action=g_reply&ID=414

Connected reports of first icon not being customizable.

Further info here:

http://www.planetblur.org/hosted/awnforum/index.php?shard=forum&action=g_reply&ID=431

searayman (mikejones3) on 2007-07-29
Changed in awn:
status: New → Confirmed

Fixed in the latest bzr revision.

Changed in awn:
assignee: nobody → mpmatikainen
importance: Undecided → Medium
status: Confirmed → Fix Released
Isaac Joseph (isaacj87) wrote :

Problem with the fix...

While it does make the first icon of the bar smaller, it seems to mess up the first icon within the taskbar area.
Sometimes it's normal sized and other times it shrinks.

Changed in awn:
status: Fix Released → In Progress
Isaac Joseph (isaacj87) wrote :

After the revision BZR 20, to correct the first icon being larger than the rest, it seems to somehow make the file-manager icon (in the taskbar area) change sizes. For example, if you have a launch the home folder, a icon appears in the task area indicating you have the folder open (file-manager), but sometimes it is the normal size and sometimes it shrinks.

My Gconf settings:
bar_height is 58
icon_offset: 17
bar_angle: 40
monitor_height: 800
monitor_width 1280
checked "force_monitor"
autohide is not turned on
panel mode is turned on

Patches used:
Stacks
OpenOffice.org custom icons
Auto-hide animation removal

It seems that it doesn't do it when the bar_height is 48. And it does it regardless of a custom-icon being used.

Isaac Joseph (isaacj87) wrote :

I think I found the problem, thankfully I had a awn-task-manager.c from revision 19.
The problem seems to be in the "Resizing Code" area. I'm guessing the modifications were done by you. Turns out it's throwing my bar completely off. My window previews are offset, it shrinks my file-manager icon. Take at look and see if I'm correct:

###awn-task-manager.c (bzr 24)###
/*** Resizing code ***/

static void
_task_resize (AwnTask *task, gpointer width)
{
 awn_task_set_width (task, GPOINTER_TO_INT (width));
}

static void
_task_manager_check_width (AwnTaskManager *task_manager)
{
 AwnTaskManagerPrivate *priv;
 AwnSettings *settings;

 priv = AWN_TASK_MANAGER_GET_PRIVATE (task_manager);
 settings = priv->settings;

 gint w, h;
 gtk_window_get_size (GTK_WINDOW (settings->window), &w, &h);

 //gint width = settings->bar_height+10;
 gint width = 60;
 gint i = 0;

 //for (i =0; i < settings->bar_height+10; i+=2) {
 for (i =0; i < 60; i+=2) {
  gint res = (settings->monitor.width) / width;
  if (res > (num_tasks+num_launchers)) {
   break;
  }
  width -=i;
 }

###awn-task-manager.c (bzr 19)###
/*** Resizing code ***/

static void
_task_resize (AwnTask *task, gpointer width)
{
 awn_task_set_width (task, GPOINTER_TO_INT (width));
}

static void
_task_manager_check_width (AwnTaskManager *task_manager)
{
 AwnTaskManagerPrivate *priv;
 AwnSettings *settings;

 priv = AWN_TASK_MANAGER_GET_PRIVATE (task_manager);
 settings = priv->settings;

 gint w, h;
 gtk_window_get_size (GTK_WINDOW (settings->window), &w, &h);

 gint width = settings->bar_height+10;
 gint i = 0;

 for (i =0; i < settings->bar_height+10; i+=2) {
  gint res = (settings->monitor.width) / width;
  if (res > (num_tasks+num_launchers)) {
   break;
  }
  width -=i;
 }

I think (I maybe wrong) that the there's something in the subtle differences between the two that is messing up my bar...Something to do with the "gint width=60"??? I'm not sure...I'm unfamiliar with these things. But if I use the awn-task-manager.c from 19 I don't have any problems

haytjes (h4writer) wrote :

@Miika-Petteri Matikainen :

I don't know if you now, but I updated that. It was needed for the resizing if the bar grow bigger than the screen. This piece of code (that needs to use the gconf setting of bar_height) calculates if the bar is to big and changes the width of all icons on it to the bar be smaller to fit the screen.

Now I tried and it isn't working with the new code anymore !!!

@haytjes

I am working with a patch to fix the resizing. I'll post it soon.

haytjes (h4writer) wrote :

After some digging, somehow this solves the problem to:

 gint width = settings->bar_height+6;
 //gint width = 60;
 gint i = 0;

 for (i =0; i < settings->bar_height+6; i+=2) {
 //for (i =0; i < 60; i+=2) {
  gint res = (settings->monitor.width) / width;
  if (res > (num_tasks+num_launchers)) {
   break;
  }
  width -=i;
 }

@haytjes
I made a patch which should fix the resizing.

haytjes (h4writer) wrote :

patch isn't working good:

1) on startup: the icons are toooooo big (think it is 128px), but I can only see the top part of it
2) after a new icon comes: the icons are good now, but the space (width) the icons have is to big. Something like 2-8px to much
3) resizing is more or less working. (guess it works good with only launchers or tasks, but if there are other applets on the bar it takes to much space)
4) Think it's good that you have the right screen dimensions, BUT it is only set if the keys aren't there already. What if you change your screen dimensions ???

Okay. Here is a new patch. Could you tell me what are your:
- bar_height
- monitor_width
- monitor_height
- number of launchers
- number of tasks
- which applets you use

haytjes (h4writer) wrote :

bar_height: 33px
monitor_width: 1024px
monitor_height: 800px
#launchers: 3
#tasks: 3
applets (in order): separator, separator, launchers, trash, separator, separator, notification area

I'm will now try your new patch ;-)

haytjes (h4writer) wrote :

bar_height: 33px
monitor_width: 1024px
monitor_height: 800px
#launchers: 3
#tasks: 3
applets (in order): separator, separator, launchers, trash, separator, separator, notification area

I will now try your new patch ;-)

haytjes (h4writer) wrote :

It is better, but still.

If you have 3 tasks and go to 24 it resizes to get everything into the space. Now when you close all those tasks to 3 again the icons are again to big. Think they are now around 60px. (my preferences is 33px)

A new patch.

haytjes (h4writer) wrote :

Still same issue:

[quote]
If you have 3 tasks and go to 24 it resizes to get everything into the space. Now when you close all those tasks to 3 again the icons are again to big. Think they are now around 60px. (my preferences is 33px)
[/quote]

Another new patch. If you click one of the tasks when they are big, do they shrink back to normal?

haytjes (h4writer) wrote :

The new patch let them shrink back to normal automatically. :-D.

But could it be that the icons are a but blurry now? After going to 20 tasks and back the icons are much better/beautifuler/less blurry and still have the same size...

(also there's now a limit to 30 tasks, after that all icons disappear...)

Isaac Joseph (isaacj87) wrote :

@Miika-Petteri Matikainen:

Patch3 works beautifully for me! Corrects the issues I had originally.

Isaac Joseph (isaacj87) wrote :

Sorry, I didn't notice that the task do seem a little large (barely noticeable but you can kind of tell)...but the patch does correct the shrinking file-manager task problem I had.

Isaac Joseph (isaacj87) wrote :

After further testing...I too, experience the same problems haytjes was having.

@haytjes and isaacj87
Thank you for testing the patch. I'll try to solve these issues.

I cannot reproduce the problem with blurry icons. I made a new patch which I'll merge to bzr if it works well enough and there are no regressions. Please test it and report any problems.

haytjes (h4writer) wrote :

Think there is a problem with it. When I go to 24 tasks everything is good, but when I want to come back and close the tasks the bar stops showing himself. It looks like it is crashed, but the terminal doesn't give me abnormal output !!!

@haytjes
Did you confirm that this doesn't happen with unpatched awn? There was an issue with closing tasks in patch3. Awn tried to load an icon to a task which was closing and that caused awn to crash. That should be fixed in patch4, however.

haytjes (h4writer) wrote :

I tried it again, and I was wrong, the crash happens only when I close the applications to fast.

@haytjes
Do you think this is stable enough for trunk?

haytjes (h4writer) wrote :

Yes, I would say it's stable enough for trunk.

(Did tested it now again on an unpatched bzr and it 'crashes' too when I close the apps to fast)

Patch merged to trunk.

Changed in awn:
status: In Progress → Fix Released
haytjes (h4writer) wrote :

This patch is to get the with equal in all situations...

Isaac Joseph (isaacj87) wrote :

Patch does not work with latest bzr 27

@haytjes
An addition to your patch:

=== modified file 'src/awn-task.c'
--- src/awn-task.c 2007-08-09 10:25:50 +0000
+++ src/awn-task.c 2007-08-09 10:48:12 +0000
@@ -304,7 +304,7 @@
                }
        }
        gtk_widget_set_size_request(GTK_WIDGET(task),
- (priv->settings->bar_height * 5/4),
+ (priv->settings->bar_height + 12),
                                    (priv->settings->bar_height + 2) * 2);

        gtk_widget_queue_draw(GTK_WIDGET(task));

haytjes (h4writer) wrote :

Committing the patch
(mine and Miika's)

haytjes (h4writer) wrote :

This patch sets the icons right when you change the bar_height. Before it didn't applied the icon_offset

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers