Awn

Merge lp:~albyrock87/awn/awn-lucido into lp:awn/0.4

Proposed by Alberto Aldegheri
Status: Merged
Merged at revision: 703
Proposed branch: lp:~albyrock87/awn/awn-lucido
Merge into: lp:awn/0.4
Diff against target: 1419 lines (+1122/-13)
12 files modified
awn-settings/awn-settings.ui (+34/-0)
awn-settings/awnDefs.py.in (+1/-0)
awn-settings/awnSettings.py.in (+6/-1)
data/avant-window-navigator.schema-ini.in.in (+7/-1)
src/Makefile.am (+2/-0)
src/awn-background-flat.c (+10/-6)
src/awn-background-lucido.c (+874/-0)
src/awn-background-lucido.h (+71/-0)
src/awn-background.c (+91/-4)
src/awn-background.h (+16/-0)
src/awn-defines.h (+1/-0)
src/awn-panel.c (+9/-1)
To merge this branch: bzr merge lp:~albyrock87/awn/awn-lucido
Reviewer Review Type Date Requested Status
Michal Hruby (community) code & behaviour Approve
Alberto Aldegheri shape-mask Abstain
Review via email: mp+26413@code.launchpad.net

This proposal supersedes a proposal from 2010-05-30.

Description of the change

This is a rewrite of awn-style-lucido.

Implemented a new style, features:
- Stripe-style
- The number of stripes changes dynamically depends on "expanders"
- If you set stripe-width>0, you can manually set the stripe position and width
- Fixed all-orientation cairo "translate"
- custom curved style if panel is not expanded
- speedup code for draw background only when need (otherwise repaint last surface)

:)

To post a comment you must log in.
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

WTF!!!

Why BZR removes 'po/avant-window-navigator.pot' if i've never touched that file?????

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

> WTF!!!
>
> Why BZR removes 'po/avant-window-navigator.pot' if i've never touched that
> file?????

There's a bug in the build system, make clean removes it, please revert the change.
Also there are a lot of lines which break our coding conventions, I know it might sound trivial, but for the review process it makes it easier to read the code. Fix please.

review: Needs Fixing (coding-conventions)
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> > WTF!!!
> >
> > Why BZR removes 'po/avant-window-navigator.pot' if i've never touched that
> > file?????
>
> There's a bug in the build system, make clean removes it, please revert the
> change.
> Also there are a lot of lines which break our coding conventions, I know it
> might sound trivial, but for the review process it makes it easier to read the
> code. Fix please.

'po/avant-window-navigator.pot' -> restored from rev 699
Conding style fixes :)
Default Stripe-Width = 0 (enables auto-stripe)

review: Needs Resubmitting
Revision history for this message
moonbeam (rcryderman) wrote : Posted in a previous version of this proposal

Seems to be leaking:

revision: 707.

After leaving it running 12-24 hours.

mapped: 1539380K writeable/private: 1297488K shared: 816K

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> Seems to be leaking:
>
> revision: 707.
>
> After leaving it running 12-24 hours.
>
> mapped: 1539380K writeable/private: 1297488K shared: 816K

I'm very sorry for that :'(

Now it's fixed (rev 710) :)

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Thanks for the style fixes. Here are my comments:

1) When using cairo methods, please use doubles directly, don't have the compiler do it ( cairo_scale (cr, 1, -1) => cairo_scale (cr, 1., -1.) )
2) You're using the expander detection quite often, move it to a function (at least the g_object_get() + gtk_container_get_children() )
3) Get rid of "g_list_free (i)", it could cause problems.
4) Since you introduced the helper surface, it'd be nice to integrate it properly into the background base class and have a "cached-drawing" property that will control whether the surface is used (default TRUE). (you'll get an extra point if you provide some statistics on how often is helps)
5) The stripe-width spin is put on a strange place in awn-settings, please try to rearrange it, so that it fits nicely.

review: Needs Fixing (code review)
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> Thanks for the style fixes. Here are my comments:
>
> 1) When using cairo methods, please use doubles directly, don't have the
> compiler do it ( cairo_scale (cr, 1, -1) => cairo_scale (cr, 1., -1.) )
> 2) You're using the expander detection quite often, move it to a function (at
> least the g_object_get() + gtk_container_get_children() )
> 3) Get rid of "g_list_free (i)", it could cause problems.
> 4) Since you introduced the helper surface, it'd be nice to integrate it
> properly into the background base class and have a "cached-drawing" property
> that will control whether the surface is used (default TRUE). (you'll get an
> extra point if you provide some statistics on how often is helps)
> 5) The stripe-width spin is put on a strange place in awn-settings, please try
> to rearrange it, so that it fits nicely.

I'm working on this.

For now I can tell you that (in lucido style), times are:
- use helper surface: ~0ms
- redraw surface: ~10ms

If you hover an icon and then run away with your mouse with bounce effect, you get about 20 redraw (during animation):
- using helper surface: ~1ms
- not using helper surface: 20*10 = 200ms

Time calculated with:
#include <time.h>

clock_t start, end;
double elapsed;

start = clock();
... /* Do the work. */
end = clock();
elapsed = ((double) (end - start)) / (((double)CLOCKS_PER_SEC) / 1000.0 );

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> Thanks for the style fixes. Here are my comments:
>
> 1) When using cairo methods, please use doubles directly, don't have the
> compiler do it ( cairo_scale (cr, 1, -1) => cairo_scale (cr, 1., -1.) )
> 2) You're using the expander detection quite often, move it to a function (at
> least the g_object_get() + gtk_container_get_children() )
> 3) Get rid of "g_list_free (i)", it could cause problems.
> 4) Since you introduced the helper surface, it'd be nice to integrate it
> properly into the background base class and have a "cached-drawing" property
> that will control whether the surface is used (default TRUE). (you'll get an
> extra point if you provide some statistics on how often is helps)
> 5) The stripe-width spin is put on a strange place in awn-settings, please try
> to rearrange it, so that it fits nicely.

Ok, What do you think about?

Some statistic? mh..
On any animation's step on every icon, you get background refreshed. (with cache in O(1) time)
The same for any expose event.

However, if you want to see how often is the redraw, you can put a:
fprintf (stderr, "I'm redrawing the bg \n");
on awn-background.c row 701

You will see that the redraw is rare, then the performance gain is very often :)

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

Resubmitting :)

PS: i've checked for mem-leaks this time, and I have not found any mem-leak.

review: Needs Resubmitting
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

As a side note, the "Resubmit" is for reviewers when they want you to resubmit the proposal, when you want to resubmit it, there's the "Resubmit proposal" link on top of this page.

1) Please revert the 1210-1220, this should go into background's finalize method.
2) It seems that awn_background_get_needs_redraw (and also the lucido variant) is not necessary to be exposed in the .h files. Please make it a static method and use the virtual klass->get_needs_redraw to call it.
3) Also why is 1190-1192 necessary?

review: Needs Fixing
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> As a side note, the "Resubmit" is for reviewers when they want you to resubmit
> the proposal, when you want to resubmit it, there's the "Resubmit proposal"
> link on top of this page.
I'm sorry, but I'm new in Lauchpad&Bzr :P

> 1) Please revert the 1210-1220, this should go into background's finalize
> method.
Done :)

> 2) It seems that awn_background_get_needs_redraw (and also the lucido variant)
> is not necessary to be exposed in the .h files. Please make it a static method
> and use the virtual klass->get_needs_redraw to call it.
awn_background_get_needs_redraw needs to be in awn-background.h because it is used in awn-background-lucido.c @ awn_background_lucido_get_needs_redraw.

Moved awn_background_lucido_get_needs_redraw into .c

> 3) Also why is 1190-1192 necessary?
Because when you move panel position from bottom to top, or left to right, width&height doesn't change. So we need to notify background to redraw itself.

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

> > 2) It seems that awn_background_get_needs_redraw (and also the lucido
> variant)
> > is not necessary to be exposed in the .h files. Please make it a static
> method
> > and use the virtual klass->get_needs_redraw to call it.
> awn_background_get_needs_redraw needs to be in awn-background.h because it is
> used in awn-background-lucido.c @ awn_background_lucido_get_needs_redraw.

It still doesn't have to be in the .h, you can use >>>
AWN_BACKGROUND_CLASS (awn_background_lucido_parent_class)-> get_needs_redraw ()

> > 3) Also why is 1190-1192 necessary?
> Because when you move panel position from bottom to top, or left to right,
> width&height doesn't change. So we need to notify background to redraw itself.

Ok, but please make a method for it (awn_background_invalidate), the usage of public variables is really unfortunate in the background class.

review: Needs Fixing
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> > > 2) It seems that awn_background_get_needs_redraw (and also the lucido
> > variant)
> > > is not necessary to be exposed in the .h files. Please make it a static
> > method
> > > and use the virtual klass->get_needs_redraw to call it.
> > awn_background_get_needs_redraw needs to be in awn-background.h because it
> is
> > used in awn-background-lucido.c @ awn_background_lucido_get_needs_redraw.
>
> It still doesn't have to be in the .h, you can use >>>
> AWN_BACKGROUND_CLASS (awn_background_lucido_parent_class)-> get_needs_redraw
> ()

Done, thank you :)

> > > 3) Also why is 1190-1192 necessary?
> > Because when you move panel position from bottom to top, or left to right,
> > width&height doesn't change. So we need to notify background to redraw
> itself.
>
> Ok, but please make a method for it (awn_background_invalidate), the usage of
> public variables is really unfortunate in the background class.

You're right, done

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Sorry for late reply, been bit busy lately...

Lines 450 and 534 will cause a crash if there are no applets setup, fix pls.

review: Needs Fixing (code-review)
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Also it'd be nice to use private structure for the 'expw' variable, don't expose it.

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Few more observations:
1) Backgrounds don't redraw properly when monitor_align is changed.
2) There are some issues with padding (no refresh) when curviness is being changed.
3) Incomplete redraw when second expander is added to the panel.

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

And one more: On bottom orientation (expanded panel) the pixels on x == 0 have incorrect color.

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> 3) Incomplete redraw when second expander is added to the panel.

I need help with this.

The way to fix this problem is call a redraw of all applets when an applet gets added/removed.

But I don't know how to do that.

review: Needs Information
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

Ok, all done.

I've found a way to fix:
> 3) Incomplete redraw when second expander is added to the panel.

Resubmitting :)

Revision history for this message
Alberto Aldegheri (albyrock87) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

Noes!! There's a bug with a special configuration, i'll fix soon :(

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> Noes!! There's a bug with a special configuration, i'll fix soon :(
Ok, done :)

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Sorry, but additions in 714 are completely redundant - please take a look for example at Edgy code...

1) There's no need for extra signal in awn-panel, if you need panel to ask you again for padding emit the "padding-changed" signal (using awn_background_emit_padding_changed).
2) There's no need for "property-changed", this is implemented automatically for every property which is registered using g_object_class_install_property. The only thing you need to do is connect to the "notify" signal of the object with detail id set to the property name. (see src/awn-background-edgy.c:146)

review: Needs Fixing (code-review)
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

And I also have one question - what is the rationale behind using curviness instead of corner_radius?

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

> And I also have one question - what is the rationale behind using curviness
> instead of corner_radius?

Because Lucido consists in curves:
- curves symmetry
- curviness

Lucido's boundary rect has no rounded corners.

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

How can I remove myself from reviewers? :D

review: Approve
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Good question... Change it to Abstain?!

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

Tanks Michal! ;)

However, Lucido seems to be ready now :)

review: Abstain
Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Looking at the latest changes, shouldn't you monitor also changes to "expand" property and emit padding-changed?

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

I think that "expand" already refreshes padding. So there's no need to observ "expand"..

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

I see, you derive from FLAT background, and it monitors expand property. Is this really intentional?

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

Haha!

Great! No, that was not intentional :P

It was intentional for some methods, but not for monitor expand :P

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Which methods exactly? It seems to me that Lucido should be derived directly from AwnBackground, not Flat...

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

For the shape mask, and initally for the padding method, but after i must reimplement that for use curviness in not-expanded mode..

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Yep :)

review: Needs Fixing
Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

review: Needs Fixing?

In what? I don't understand, do you want that i change the parent to AwnBackground?

Revision history for this message
Michal Hruby (mhr3) wrote : Posted in a previous version of this proposal

Oh sorry, we didn't understand each other... Yes, please change the base class to AwnBackground and implement correct version of get_shape_mask.

Revision history for this message
Alberto Aldegheri (albyrock87) wrote : Posted in a previous version of this proposal

I understand that my english is not so good :D

I'll do the job soon then I resubmit :)

Revision history for this message
Michal Hruby (mhr3) wrote :

The mask is incorrect when using non-expanded mode, please make sure the corners are clickable exactly as it's painted. (like in BackgroundCurved)

review: Needs Fixing (shape-mask)
Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

Shape-mask fixed :)

review: Abstain (shape-mask)
Revision history for this message
Michal Hruby (mhr3) wrote :

Yep, looks good. I'm going to merge it in the current state, but there's two more things I'd like to see which can be merged later:

1) stripe_width == 0.0 has the same color as stripe_width == 1.0 and there's a big change when going from 0.0 to 0.01, please fix.
2) Paint the outline on the corners in non-composited mode.

review: Approve (code & behaviour)
Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

I don't understand this:
> 1) stripe_width == 0.0 has the same color as stripe_width == 1.0 and there's a
> big change when going from 0.0 to 0.01, please fix.

Can you explain in other words?

lp:~albyrock87/awn/awn-lucido updated
703. By Michal Hruby

Merge Lucido style from <lp:~albyrock87/awn/awn-lucido>

Revision history for this message
Michal Hruby (mhr3) wrote :

If I have Lucido with black and white colors, it will be fully white for stripe-width 0.0 and also 1.0, but if I use 0.01 it'll be almost fully black (when non-expanded). Therefore IMO it should be fully black when using 0.0.

Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

Great idea!!

Coding it now :)

Revision history for this message
Alberto Aldegheri (albyrock87) wrote :

> If I have Lucido with black and white colors, it will be fully white for stripe-width 0.0 and also
> 1.0, but if I use 0.01 it'll be almost fully black (when non-expanded). Therefore IMO it should be
> fully black when using 0.0.

I think it's done now, give it a try! ;)

Revision history for this message
Michal Hruby (mhr3) wrote :

Yep, better now, but there's still a slight displacement of the gradient... sorry perfectionist here :P
Also, please pull trunk branch, I did some slight changes to your code.

Anyway this thread has gone long enough, feel free to join us on freenode in #awn.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'awn-settings/awn-settings.ui'
--- awn-settings/awn-settings.ui 2010-03-08 12:50:07 +0000
+++ awn-settings/awn-settings.ui 2010-05-31 17:25:42 +0000
@@ -908,6 +908,22 @@
908 </packing>908 </packing>
909 </child>909 </child>
910 <child>910 <child>
911 <object class="GtkSpinButton" id="theme_stripe_width">
912 <property name="visible">True</property>
913 <property name="can_focus">True</property>
914 <property name="invisible_char">&#x25CF;</property>
915 <property name="adjustment">adj_stripe_width</property>
916 <property name="digits">2</property>
917 </object>
918 <packing>
919 <property name="left_attach">5</property>
920 <property name="right_attach">6</property>
921 <property name="top_attach">8</property>
922 <property name="bottom_attach">9</property>
923 <property name="x_options"></property>
924 </packing>
925 </child>
926 <child>
911 <object class="GtkSpinButton" id="theme_angle">927 <object class="GtkSpinButton" id="theme_angle">
912 <property name="visible">True</property>928 <property name="visible">True</property>
913 <property name="can_focus">True</property>929 <property name="can_focus">True</property>
@@ -964,6 +980,20 @@
964 </packing>980 </packing>
965 </child>981 </child>
966 <child>982 <child>
983 <object class="GtkLabel" id="label_stripe">
984 <property name="visible">True</property>
985 <property name="xalign">0</property>
986 <property name="xpad">0</property>
987 <property name="label" translatable="yes">Stripe Width</property>
988 </object>
989 <packing>
990 <property name="left_attach">3</property>
991 <property name="right_attach">5</property>
992 <property name="top_attach">8</property>
993 <property name="bottom_attach">9</property>
994 </packing>
995 </child>
996 <child>
967 <object class="GtkLabel" id="label49">997 <object class="GtkLabel" id="label49">
968 <property name="visible">True</property>998 <property name="visible">True</property>
969 <property name="xalign">0</property>999 <property name="xalign">0</property>
@@ -3406,6 +3436,10 @@
3406 <property name="upper">1</property>3436 <property name="upper">1</property>
3407 <property name="step_increment">0.01</property>3437 <property name="step_increment">0.01</property>
3408 </object>3438 </object>
3439 <object class="GtkAdjustment" id="adj_stripe_width">
3440 <property name="upper">1</property>
3441 <property name="step_increment">0.01</property>
3442 </object>
3409 <object class="GtkAdjustment" id="adj_radius">3443 <object class="GtkAdjustment" id="adj_radius">
3410 <property name="upper">100</property>3444 <property name="upper">100</property>
3411 <property name="step_increment">1</property>3445 <property name="step_increment">1</property>
34123446
=== modified file 'awn-settings/awnDefs.py.in'
--- awn-settings/awnDefs.py.in 2010-04-29 14:58:51 +0000
+++ awn-settings/awnDefs.py.in 2010-05-31 17:25:42 +0000
@@ -86,6 +86,7 @@
86PANEL_ANGLE = "panel_angle" #float86PANEL_ANGLE = "panel_angle" #float
87CURVINESS = "curviness" #float87CURVINESS = "curviness" #float
88CURVES_SYMMETRY = "curves_symmetry" #float88CURVES_SYMMETRY = "curves_symmetry" #float
89STRIPE_WIDTH = "stripe_width" #float
89TOOLTIP_FONT_NAME = "tooltip_font_name" #string90TOOLTIP_FONT_NAME = "tooltip_font_name" #string
90TOOLTIP_FONT_COLOR = "tooltip_font_color" #string91TOOLTIP_FONT_COLOR = "tooltip_font_color" #string
91TOOLTIP_BG_COLOR = "tooltip_bg_color" #string92TOOLTIP_BG_COLOR = "tooltip_bg_color" #string
9293
=== modified file 'awn-settings/awnSettings.py.in'
--- awn-settings/awnSettings.py.in 2010-05-28 08:09:17 +0000
+++ awn-settings/awnSettings.py.in 2010-05-31 17:25:42 +0000
@@ -141,7 +141,8 @@
141 #setup style mode141 #setup style mode
142 dropdown = self.wTree.get_object("stylecombo")142 dropdown = self.wTree.get_object("stylecombo")
143 self.create_dropdown(dropdown, [_("None"), _("Flat"), _("3d"),143 self.create_dropdown(dropdown, [_("None"), _("Flat"), _("3d"),
144 _("Curved"), _("Edgy"), _("Floaty")])144 _("Curved"), _("Edgy"), _("Floaty"),
145 _("Lucido")])
145146
146 #setup behaviour combo147 #setup behaviour combo
147 dropdown = self.wTree.get_object("behaviorcombo")148 dropdown = self.wTree.get_object("behaviorcombo")
@@ -578,6 +579,7 @@
578 579
579 curviness = gobject.property(type=int, default=10)580 curviness = gobject.property(type=int, default=10)
580 curves_symmetry = gobject.property(type=float, default=0)581 curves_symmetry = gobject.property(type=float, default=0)
582 stripe_width = gobject.property(type=float, default=0)
581 angle = gobject.property(type=int, default=45)583 angle = gobject.property(type=int, default=45)
582 radius = gobject.property(type=int, default=10)584 radius = gobject.property(type=int, default=10)
583 gtk_theme_mode = gobject.property(type=bool, default=False)585 gtk_theme_mode = gobject.property(type=bool, default=False)
@@ -727,6 +729,7 @@
727 (defs.THEME, defs.PANEL_ANGLE, 'float', sizes),729 (defs.THEME, defs.PANEL_ANGLE, 'float', sizes),
728 (defs.THEME, defs.CURVINESS, 'float', sizes),730 (defs.THEME, defs.CURVINESS, 'float', sizes),
729 (defs.THEME, defs.CURVES_SYMMETRY, 'float', sizes),731 (defs.THEME, defs.CURVES_SYMMETRY, 'float', sizes),
732 (defs.THEME, defs.STRIPE_WIDTH, 'float', sizes),
730 (defs.THEME, defs.TOOLTIP_FONT_NAME, 'str', icon),733 (defs.THEME, defs.TOOLTIP_FONT_NAME, 'str', icon),
731 (defs.THEME, defs.TOOLTIP_FONT_COLOR, 'str', icon),734 (defs.THEME, defs.TOOLTIP_FONT_COLOR, 'str', icon),
732 (defs.THEME, defs.TOOLTIP_BG_COLOR, 'str', icon),735 (defs.THEME, defs.TOOLTIP_BG_COLOR, 'str', icon),
@@ -823,6 +826,8 @@
823 "curviness", "theme_curviness"),826 "curviness", "theme_curviness"),
824 (self.client, defs.THEME, defs.CURVES_SYMMETRY,827 (self.client, defs.THEME, defs.CURVES_SYMMETRY,
825 "curves-symmetry", "theme_symmetry"),828 "curves-symmetry", "theme_symmetry"),
829 (self.client, defs.THEME, defs.STRIPE_WIDTH,
830 "stripe-width", "theme_stripe_width"),
826 (self.client, defs.THEME, defs.PANEL_ANGLE,831 (self.client, defs.THEME, defs.PANEL_ANGLE,
827 "angle", "theme_angle"),832 "angle", "theme_angle"),
828 (self.client, defs.THEME, defs.CORNER_RADIUS,833 (self.client, defs.THEME, defs.CORNER_RADIUS,
829834
=== modified file 'data/avant-window-navigator.schema-ini.in.in'
--- data/avant-window-navigator.schema-ini.in.in 2010-03-09 20:20:25 +0000
+++ data/avant-window-navigator.schema-ini.in.in 2010-05-31 17:25:42 +0000
@@ -159,7 +159,7 @@
159[panel/style]159[panel/style]
160type = integer160type = integer
161default = 1161default = 1
162_description=The style of the bar. (none=0, flat bar=1, 3d bar=2, curved bar=3, edgy=4, floaty=5)162_description=The style of the bar. (none=0, flat bar=1, 3d bar=2, curved bar=3, edgy=4, floaty=5,lucido=6)
163163
164[panels/panel_list]164[panels/panel_list]
165type = list-integer165type = list-integer
@@ -227,6 +227,12 @@
227_description=The curviness of the panel in Curves mode.227_description=The curviness of the panel in Curves mode.
228per_instance = false228per_instance = false
229229
230[theme/stripe_width]
231type = float
232default = 0.0
233_description=The width of the stripe in Lucido mode.
234per_instance = false
235
230[theme/dialog_gtk_mode]236[theme/dialog_gtk_mode]
231type = boolean237type = boolean
232default = true238default = true
233239
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2010-03-24 23:24:19 +0000
+++ src/Makefile.am 2010-05-31 17:25:42 +0000
@@ -41,6 +41,8 @@
41 awn-background-edgy.h \41 awn-background-edgy.h \
42 awn-background-floaty.c \42 awn-background-floaty.c \
43 awn-background-floaty.h \43 awn-background-floaty.h \
44 awn-background-lucido.c \
45 awn-background-lucido.h \
44 awn-defines.h \46 awn-defines.h \
45 $(builddir)/awn-marshal.c \47 $(builddir)/awn-marshal.c \
46 $(builddir)/awn-marshal.h \48 $(builddir)/awn-marshal.h \
4749
=== modified file 'src/awn-background-flat.c'
--- src/awn-background-flat.c 2010-03-07 18:38:07 +0000
+++ src/awn-background-flat.c 2010-05-31 17:25:42 +0000
@@ -324,20 +324,24 @@
324 switch (position)324 switch (position)
325 {325 {
326 case GTK_POS_RIGHT:326 case GTK_POS_RIGHT:
327 cairo_translate (cr, x, y+height);327 cairo_translate (cr, 0., y + height);
328 cairo_scale (cr, 1., -1.);
329 cairo_translate (cr, x, height);
328 cairo_rotate (cr, M_PI * 1.5);330 cairo_rotate (cr, M_PI * 1.5);
329 temp = width;331 temp = width;
330 width = height; height = temp;332 width = height;
333 height = temp;
331 break;334 break;
332 case GTK_POS_LEFT:335 case GTK_POS_LEFT:
333 cairo_translate (cr, x+width, y);336 cairo_translate (cr, x + width, y);
334 cairo_rotate (cr, M_PI * 0.5);337 cairo_rotate (cr, M_PI * 0.5);
335 temp = width;338 temp = width;
336 width = height; height = temp;339 width = height;
340 height = temp;
337 break;341 break;
338 case GTK_POS_TOP:342 case GTK_POS_TOP:
339 cairo_translate (cr, x+width, y+height);343 cairo_translate (cr, x, y + height);
340 cairo_rotate (cr, M_PI);344 cairo_scale (cr, 1., -1.);
341 break;345 break;
342 default:346 default:
343 cairo_translate (cr, x, y);347 cairo_translate (cr, x, y);
344348
=== added file 'src/awn-background-lucido.c'
--- src/awn-background-lucido.c 1970-01-01 00:00:00 +0000
+++ src/awn-background-lucido.c 2010-05-31 17:25:42 +0000
@@ -0,0 +1,874 @@
1/*
2 * Copyright (C) 2009 Michal Hruby <michal.mhr@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author : Alberto Aldegheri <albyrock87+dev@gmail.com>
19 * Thanks to: Matt <sharkbaitbobby@gmail.com>
20 * for the code section to analyze expanders
21 *
22 */
23
24#include "config.h"
25
26#include <gdk/gdk.h>
27#include <libawn/awn-cairo-utils.h>
28#include <math.h>
29
30#include "awn-applet-manager.h"
31#include "awn-background-lucido.h"
32#include "awn-separator.h"
33
34G_DEFINE_TYPE (AwnBackgroundLucido, awn_background_lucido, AWN_TYPE_BACKGROUND)
35
36#define AWN_BACKGROUND_LUCIDO_GET_PRIVATE(obj) ( \
37 G_TYPE_INSTANCE_GET_PRIVATE (obj, AWN_TYPE_BACKGROUND_LUCIDO, \
38 AwnBackgroundLucidoPrivate))
39
40struct _AwnBackgroundLucidoPrivate
41{
42 gint expw;
43 gint expn;
44};
45
46static void awn_background_lucido_draw (AwnBackground *bg,
47 cairo_t *cr,
48 GtkPositionType position,
49 GdkRectangle *area);
50
51static void awn_background_lucido_get_shape_mask (AwnBackground *bg,
52 cairo_t *cr,
53 GtkPositionType position,
54 GdkRectangle *area);
55
56static void awn_background_lucido_padding_request (AwnBackground *bg,
57 GtkPositionType position,
58 guint *padding_top,
59 guint *padding_bottom,
60 guint *padding_left,
61 guint *padding_right);
62
63static gboolean
64awn_background_lucido_get_needs_redraw (AwnBackground *bg,
65 GtkPositionType position,
66 GdkRectangle *area);
67
68static void
69awn_background_lucido_curviness_changed (AwnBackground *bg)
70{
71 gboolean expand = FALSE;
72 g_object_get (bg->panel, "expand", &expand, NULL);
73
74 if (!expand)
75 awn_background_emit_padding_changed (bg);
76}
77
78static void
79awn_background_lucido_expand_changed (AwnBackground *bg)
80{
81 awn_background_emit_padding_changed (bg);
82}
83
84static void
85awn_background_lucido_align_changed (AwnBackground *bg)
86{
87 awn_background_emit_padding_changed (bg);
88}
89
90static void
91awn_background_lucido_constructed (GObject *object)
92{
93 G_OBJECT_CLASS (awn_background_lucido_parent_class)->constructed (object);
94
95 AwnBackground *bg = AWN_BACKGROUND (object);
96 gpointer monitor = NULL;
97
98 g_signal_connect_swapped (bg, "notify::curviness",
99 G_CALLBACK (awn_background_lucido_curviness_changed),
100 object);
101
102 g_return_if_fail (bg->panel);
103
104 g_signal_connect_swapped (bg->panel, "notify::expand",
105 G_CALLBACK (awn_background_lucido_expand_changed),
106 object);
107
108 g_object_get (bg->panel, "monitor", &monitor, NULL);
109
110 g_return_if_fail (monitor);
111
112 g_signal_connect_swapped (monitor, "notify::monitor-align",
113 G_CALLBACK (awn_background_lucido_align_changed),
114 object);
115}
116
117static void
118awn_background_lucido_dispose (GObject *object)
119{
120 gpointer monitor = NULL;
121 if (AWN_BACKGROUND (object)->panel)
122 g_object_get (AWN_BACKGROUND (object)->panel, "monitor", &monitor, NULL);
123
124 if (monitor)
125 g_signal_handlers_disconnect_by_func (monitor,
126 G_CALLBACK (awn_background_lucido_align_changed), object);
127
128 g_signal_handlers_disconnect_by_func (AWN_BACKGROUND (object)->panel,
129 G_CALLBACK (awn_background_lucido_expand_changed), object);
130
131 g_signal_handlers_disconnect_by_func (AWN_BACKGROUND (object),
132 G_CALLBACK (awn_background_lucido_curviness_changed), object);
133
134 G_OBJECT_CLASS (awn_background_lucido_parent_class)->dispose (object);
135}
136
137static void
138awn_background_lucido_class_init (AwnBackgroundLucidoClass *klass)
139{
140 AwnBackgroundClass *bg_class = AWN_BACKGROUND_CLASS (klass);
141
142 GObjectClass *obj_class = G_OBJECT_CLASS (klass);
143 obj_class->constructed = awn_background_lucido_constructed;
144 obj_class->dispose = awn_background_lucido_dispose;
145
146 bg_class->draw = awn_background_lucido_draw;
147 bg_class->padding_request = awn_background_lucido_padding_request;
148 bg_class->get_shape_mask = awn_background_lucido_get_shape_mask;
149 bg_class->get_input_shape_mask = awn_background_lucido_get_shape_mask;
150 bg_class->get_needs_redraw = awn_background_lucido_get_needs_redraw;
151
152 g_type_class_add_private (obj_class, sizeof (AwnBackgroundLucidoPrivate));
153}
154
155static void
156awn_background_lucido_init (AwnBackgroundLucido *bg)
157{
158
159}
160
161AwnBackground *
162awn_background_lucido_new (DesktopAgnosticConfigClient *client,
163 AwnPanel *panel)
164{
165 AwnBackground *bg;
166
167 bg = g_object_new (AWN_TYPE_BACKGROUND_LUCIDO,
168 "client", client,
169 "panel", panel,
170 NULL);
171 return bg;
172}
173
174/*
175 * Drawing functions
176 */
177static void
178_line_from_to ( cairo_t *cr,
179 gfloat *xs,
180 gfloat *ys,
181 gfloat xf,
182 gfloat yf)
183{
184 if ( *xs==xf || *ys==yf ) /* Vertical/Horizontal line */
185 cairo_line_to (cr, xf, yf);
186 else
187 { /* Oblique */
188 gfloat xm = ( *xs + xf ) / 2.0;
189 cairo_curve_to (cr, xm, *ys, xm, yf, xf, yf);
190 }
191 *xs = xf;
192 *ys = yf;
193}
194
195static GList*
196_get_applet_widgets (AwnBackground* bg)
197{
198 AwnAppletManager *manager = NULL;
199 g_object_get (bg->panel, "applet-manager", &manager, NULL);
200
201 return gtk_container_get_children (GTK_CONTAINER (manager));
202}
203
204/**
205 * _create_path_lucido:
206 * @bg: The background pointer
207 * @position: The position of the bar
208 * @cairo_t: The cairo context
209 * @y: The top left coordinate of the "bar rect" - default = 0
210 * @w: The width of the bar
211 * @h: The height of the bar
212 * @stripe: The width of the stripe (0.0-1.0). Zero for auto-stripe.
213 * @d: The width of each curve in the path
214 * @dc: The width of the external curves in non-expanded&auto mode
215 * @symmetry: The symmetry of the stripe when @stripe > 0
216 * @internal: If Zero, creates the path for the stripe
217 * @expanded: If Zero, the bar is not expanded
218 *
219 * This function creates paths on which the bar will be drawn.
220 * In atuo-stripe, it searchs for expanders applet, each expander
221 * equals to one curve.
222 * If the first widget is an expander, start from bottom-left,
223 * otherwise start from top-left
224 */
225
226static void
227_create_path_lucido ( AwnBackground* bg,
228 GtkPositionType position,
229 cairo_t* cr,
230 gfloat x,
231 gfloat y,
232 gfloat w,
233 gfloat h,
234 gfloat stripe,
235 gfloat d,
236 gfloat dc,
237 gfloat symmetry,
238 gboolean internal,
239 gboolean expanded,
240 gfloat align)
241{
242 cairo_new_path (cr);
243
244 gfloat lx = x;
245 gfloat ly = y;
246 gfloat y3 = y + h;
247 gfloat y2 = y3 - 5;
248
249 if (stripe > 0)
250 {
251 if (expanded)
252 {
253 stripe = (w * stripe); /* now stripe = non-stripe */
254 if (internal)
255 {
256 /* Manual-Stripe & Expanded & Internal */
257 lx = stripe * symmetry;
258 cairo_move_to (cr, lx, ly);
259 _line_from_to (cr, &lx, &ly, lx+d, y2);
260 _line_from_to (cr, &lx, &ly, w-stripe * (1. - symmetry) - d, y2);
261 _line_from_to (cr, &lx, &ly, w-stripe * (1. - symmetry), y);
262 cairo_close_path (cr);
263 }
264 else
265 {
266 /* Manual-Stripe & Expanded & External */
267 ly = y3;
268 cairo_move_to (cr, lx, ly);
269 _line_from_to (cr, &lx, &ly, lx, y);
270 _line_from_to (cr, &lx, &ly, stripe * symmetry, y);
271 _line_from_to (cr, &lx, &ly, stripe * symmetry + d, y2);
272 _line_from_to (cr, &lx, &ly, w - stripe * (1. - symmetry) - d, y2);
273 _line_from_to (cr, &lx, &ly, w - stripe * (1. - symmetry), y);
274 _line_from_to (cr, &lx, &ly, w, y);
275 _line_from_to (cr, &lx, &ly, w, y3);
276 cairo_close_path (cr);
277 }
278 }
279 else
280 {
281 if (stripe == 1.)
282 {
283 _create_path_lucido (bg, position, cr, x, y, w, h, 0.,
284 d, dc, 0., internal, expanded, align);
285 return;
286 }
287 stripe = ((w - dc * 2) * stripe); /* now stripe = non-stripe */
288 if (internal)
289 {
290 /* Manual-Stripe & Not-Expanded & Internal */
291 lx = stripe * symmetry + dc;
292 cairo_move_to (cr, lx, ly);
293 _line_from_to (cr, &lx, &ly, lx + d, y2);
294 _line_from_to (cr, &lx, &ly, w - stripe * (1.- symmetry) - dc - d, y2);
295 _line_from_to (cr, &lx, &ly, w - stripe * (1.- symmetry) - dc, y);
296 cairo_close_path (cr);
297 }
298 else
299 {
300 /* Manual-Stripe & Not-Expanded & External */
301 ly = y3;
302 cairo_move_to (cr, lx, ly);
303 _line_from_to (cr, &lx, &ly, lx+dc, y);
304 _line_from_to (cr, &lx, &ly, stripe * symmetry + dc, y);
305 _line_from_to (cr, &lx, &ly, stripe * symmetry + d + dc, y2);
306 _line_from_to (cr, &lx, &ly, w-stripe * (1. - symmetry) - dc - d, y2);
307 _line_from_to (cr, &lx, &ly, w-stripe * (1. - symmetry) - dc, y);
308 _line_from_to (cr, &lx, &ly, w-dc, y);
309 _line_from_to (cr, &lx, &ly, w, y3);
310 cairo_close_path(cr);
311 }
312 }
313 }
314 else
315 {
316 gint exps_found = 0;
317 gfloat curx = x;
318
319 if (expanded)
320 {
321 if (internal)
322 {
323 /* Auto-Stripe & Expanded & Internal */
324 GList *widgets = _get_applet_widgets (bg);
325 GList *i = widgets;
326 GtkWidget *widget = NULL;
327
328 /* analyze first widget*/
329 if (i)
330 {
331 widget = GTK_WIDGET (i->data);
332
333 /* if first widget is an expander or align==0 || 1*/
334 if ( (widget && GTK_IS_IMAGE (widget) && !AWN_IS_SEPARATOR (widget) ) ||
335 ( align == 0. || align == 1. ) )
336 {
337 /* start from bottom */
338 lx = curx;
339 ly = y;
340 cairo_move_to (cr, lx, ly);
341 _line_from_to (cr, &lx, &ly, lx, y2);
342 ++exps_found;
343 if (align != 0. && align != 1.)
344 i = i->next;
345 }
346 }
347 /* else start from top */
348
349 for (; i; i = i->next)
350 {
351 widget = GTK_WIDGET (i->data);
352
353 if (!GTK_IS_IMAGE (widget) || AWN_IS_SEPARATOR (widget))
354 {
355 /* if not expander continue */
356 continue;
357 }
358 /* expander found */
359 switch (position)
360 {
361 case GTK_POS_BOTTOM:
362 case GTK_POS_TOP:
363 curx = widget->allocation.x;
364 if (exps_found % 2 != 0)
365 curx += widget->allocation.width;
366 break;
367 default:
368 curx = widget->allocation.y;
369 if ( exps_found % 2 != 0)
370 curx += widget->allocation.height;
371 break;
372 }
373 if (curx < 0)
374 continue;
375
376 if (exps_found == 0)
377 {
378 /* this is the first expander */
379 lx = curx;
380 cairo_move_to (cr, lx, ly);
381 _line_from_to (cr, &lx, &ly, curx + d, y2);
382 }
383 else
384 {
385 if (exps_found % 2 != 0)
386 {
387 /* odd expander - curve at the end of expander */
388 _line_from_to (cr, &lx, &ly, curx - d, y2);
389 if (i->next == NULL)
390 _line_from_to (cr, &lx, &ly, curx, y2);
391 _line_from_to (cr, &lx, &ly, curx, y);
392 }
393 else
394 {
395 /* even expander - curve at the start of expander */
396 _line_from_to (cr, &lx, &ly, curx, y);
397 _line_from_to (cr, &lx, &ly, curx + d, y2);
398 /* else the last widget is an expander */
399 }
400 }
401
402 ++exps_found;
403 }
404 g_list_free (widgets);
405
406 _line_from_to (cr, &lx, &ly, w, ly);
407
408 if (exps_found % 2 != 0)
409 _line_from_to (cr, &lx, &ly, lx, y);
410
411 cairo_close_path (cr);
412 }
413 else
414 {
415 /* Auto-Stripe & Expanded & External */
416
417 GList *widgets = _get_applet_widgets (bg);
418 GList *i = widgets;
419 GtkWidget *widget = NULL;
420
421 /* analyze first widget*/
422 if (i)
423 {
424 widget = GTK_WIDGET (i->data);
425
426 ly = y3;
427 cairo_move_to (cr, lx, ly);
428
429 /* if first widget is an expander or align==0 || 1*/
430 if ( (widget && GTK_IS_IMAGE (widget) && !AWN_IS_SEPARATOR (widget) ) ||
431 ( align == 0. || align == 1. ) )
432 {
433 /* start from bottom */
434 _line_from_to (cr, &lx, &ly, lx, y2);
435 ++exps_found;
436 if (align != 0. && align != 1.)
437 i = i->next;
438 }
439 else
440 {
441 /* start from top */
442 _line_from_to (cr, &lx, &ly, lx, y);
443 }
444 }
445
446 for (; i; i = i->next)
447 {
448 widget = GTK_WIDGET (i->data);
449
450 if (!GTK_IS_IMAGE (widget) || AWN_IS_SEPARATOR (widget))
451 {
452 /* if not expander continue */
453 continue;
454 }
455 /* expander found */
456 switch (position)
457 {
458 case GTK_POS_BOTTOM:
459 case GTK_POS_TOP:
460 curx = widget->allocation.x;
461 if (exps_found % 2 != 0)
462 curx += widget->allocation.width;
463 break;
464 default:
465 curx = widget->allocation.y;
466 if (exps_found % 2 != 0)
467 curx += widget->allocation.height;
468 break;
469 }
470 if (curx < 0)
471 continue;
472
473 if (exps_found % 2 != 0)
474 {
475 _line_from_to (cr, &lx, &ly, curx - d, y2);
476 if (i->next != NULL)
477 _line_from_to (cr, &lx, &ly, curx, y);
478 }
479 else
480 {
481 _line_from_to (cr, &lx, &ly, curx, y);
482 _line_from_to (cr, &lx, &ly, curx + d, y2);
483 }
484 ++exps_found;
485 }
486 g_list_free (widgets);
487
488 _line_from_to (cr, &lx, &ly, w, ly);
489 _line_from_to (cr, &lx, &ly, lx, y3);
490
491 cairo_close_path (cr);
492 }
493 }
494 else
495 {
496 if (internal)
497 {
498 /* Auto-Stripe & Not-Expanded & Internal */
499 /* no-path */
500 }
501 else
502 {
503 /* Auto-Stripe & Not-Expanded & External */
504 ly = y3;
505 cairo_move_to (cr, lx, ly);
506
507 if (align == 0.)
508 _line_from_to (cr, &lx, &ly, lx , y);
509 else
510 _line_from_to (cr, &lx, &ly, lx + dc, y);
511
512 if (align == 1.)
513 _line_from_to (cr, &lx, &ly, w, y);
514 else
515 _line_from_to (cr, &lx, &ly, w - dc, y);
516
517 _line_from_to (cr, &lx, &ly, w, y3);
518 cairo_close_path (cr);
519 }
520 }
521 }
522}
523
524static void
525draw_top_bottom_background (AwnBackground* bg,
526 GtkPositionType position,
527 cairo_t* cr,
528 gint width,
529 gint height)
530{
531 cairo_pattern_t *pat = NULL;
532 cairo_pattern_t *pat_hi = NULL;
533
534 /* Basic set-up */
535 cairo_set_line_width (cr, 1.0);
536 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
537
538 gboolean expand = FALSE;
539 g_object_get (bg->panel, "expand", &expand, NULL);
540
541 gfloat align = awn_background_get_panel_alignment (AWN_BACKGROUND (bg));
542
543 /* Make sure the bar gets drawn on the 0.5 pixels (for sharp edges) */
544 switch (position)
545 {
546 case GTK_POS_TOP:
547 case GTK_POS_BOTTOM:
548 cairo_translate (cr, 0., 0.5);
549 break;
550 default:
551 cairo_translate (cr, 0.5, 0.);
552 break;
553 }
554
555 if(gtk_widget_is_composited (GTK_WIDGET (bg->panel) ) == FALSE)
556 {
557 goto paint_lines;
558 }
559
560 /* create internal path */
561 _create_path_lucido (bg, position, cr, -1.0, 0., width, height,
562 bg->stripe_width, bg->curviness,
563 bg->curviness, bg->curves_symmetry,
564 1, expand, align);
565
566 /* Draw internal pattern if needed */
567 if (bg->enable_pattern && bg->pattern)
568 {
569 /* Prepare pattern */
570 pat = cairo_pattern_create_for_surface (bg->pattern);
571 cairo_pattern_set_extend (pat, CAIRO_EXTEND_REPEAT);
572 /* Draw */
573 cairo_save (cr);
574 cairo_clip_preserve (cr);
575 cairo_set_source (cr, pat);
576 cairo_paint (cr);
577 cairo_restore (cr);
578 cairo_pattern_destroy (pat);
579 }
580
581 /* Prepare the internal background */
582 pat = cairo_pattern_create_linear (0, 0, 0, height);
583 awn_cairo_pattern_add_color_stop_color (pat, 0.0, bg->border_color);
584 awn_cairo_pattern_add_color_stop_color (pat, 1.0, bg->hilight_color);
585
586 /* Draw the internal background gradient */
587 cairo_save (cr);
588 cairo_clip_preserve (cr);
589 cairo_set_source (cr, pat);
590 cairo_paint (cr);
591 cairo_restore (cr);
592 cairo_pattern_destroy (pat);
593
594 /* Prepare external background gradient*/
595 pat = cairo_pattern_create_linear (0, 0, 0, height);
596 awn_cairo_pattern_add_color_stop_color (pat, 0.0, bg->g_step_1);
597 awn_cairo_pattern_add_color_stop_color (pat, 1.0, bg->g_step_2);
598
599 /* create external path */
600 _create_path_lucido (bg, position, cr, -1.0, 0., width, height,
601 bg->stripe_width, bg->curviness,
602 bg->curviness, bg->curves_symmetry,
603 0, expand, align);
604
605 /* Draw the external background */
606 cairo_save (cr);
607 cairo_clip_preserve (cr);
608 cairo_set_source (cr, pat);
609 cairo_paint (cr);
610 cairo_restore (cr);
611 cairo_pattern_destroy (pat);
612
613 /* Draw the hi-light */
614 pat_hi = cairo_pattern_create_linear (0, 0, 0, (height / 3.0));
615 awn_cairo_pattern_add_color_stop_color (pat_hi, 0.0, bg->g_histep_1);
616 awn_cairo_pattern_add_color_stop_color (pat_hi, 1.0, bg->g_histep_2);
617
618 if (expand)
619 {
620 cairo_new_path (cr);
621 cairo_rectangle (cr, 0, 0, width, (height / 3.0));
622 }
623
624 cairo_set_source (cr, pat_hi);
625 cairo_fill (cr);
626 cairo_pattern_destroy (pat_hi);
627
628 return;
629 /* if not composited */
630paint_lines:
631
632 if (expand)
633 {
634 /* Internal border */
635 awn_cairo_set_source_color (cr, bg->hilight_color);
636 cairo_rectangle (cr, 1, 1, width - 3, height + 3);
637 cairo_stroke (cr);
638
639 /* External border */
640 awn_cairo_set_source_color (cr, bg->border_color);
641 cairo_rectangle (cr, 1, 1, width - 1, height + 3);
642 }
643 else
644 {
645 awn_cairo_set_source_color (cr, bg->border_color);
646 _create_path_lucido (bg, position, cr, 0., 0., width, height,
647 bg->stripe_width, bg->curviness,
648 bg->curviness, bg->curves_symmetry,
649 0, expand, align);
650 cairo_stroke (cr);
651 awn_cairo_set_source_color (cr, bg->hilight_color);
652 _create_path_lucido (bg, position, cr, 1., 1., width-1., height-1.,
653 bg->stripe_width, bg->curviness,
654 bg->curviness, bg->curves_symmetry,
655 0, expand, align);
656 }
657 cairo_stroke (cr);
658}
659
660
661static
662void awn_background_lucido_padding_request (AwnBackground *bg,
663 GtkPositionType position,
664 guint *padding_top,
665 guint *padding_bottom,
666 guint *padding_left,
667 guint *padding_right)
668{
669 #define TOP_PADDING 2
670 gboolean expand = FALSE;
671 g_object_get (bg->panel, "expand", &expand, NULL);
672 gint side_padding = expand ? 0 : bg->curviness;
673 gint zero_padding = 0;
674
675 gfloat align = awn_background_get_panel_alignment (bg);
676 if (awn_background_do_rtl_swap (bg))
677 {
678 if (align <= 0.0 || align >= 1.0)
679 {
680 zero_padding = side_padding;
681 side_padding = 0;
682 }
683 }
684
685 switch (position)
686 {
687 case GTK_POS_TOP:
688 *padding_top = 0;
689 *padding_bottom = TOP_PADDING;
690 *padding_left = align == 0.0 ? zero_padding : side_padding;
691 *padding_right = align == 1.0 ? zero_padding : side_padding;
692 break;
693 case GTK_POS_BOTTOM:
694 *padding_top = TOP_PADDING;
695 *padding_bottom = 0;
696 *padding_left = align == 0.0 ? zero_padding : side_padding;
697 *padding_right = align == 1.0 ? zero_padding : side_padding;
698 break;
699 case GTK_POS_LEFT:
700 *padding_top = align == 0.0 ? zero_padding : side_padding;
701 *padding_bottom = align == 1.0 ? zero_padding : side_padding;
702 *padding_left = 0;
703 *padding_right = TOP_PADDING;
704 break;
705 case GTK_POS_RIGHT:
706 *padding_top = align == 0.0 ? zero_padding : side_padding;
707 *padding_bottom = align == 1.0 ? zero_padding : side_padding;
708 *padding_left = TOP_PADDING;
709 *padding_right = 0;
710 break;
711 default:
712 break;
713 }
714}
715
716
717
718static void
719awn_background_lucido_draw (AwnBackground *bg,
720 cairo_t *cr,
721 GtkPositionType position,
722 GdkRectangle *area)
723{
724 gint temp;
725 gint x = area->x, y = area->y;
726 gint width = area->width, height = area->height;
727 cairo_save (cr);
728
729 switch (position)
730 {
731 case GTK_POS_RIGHT:
732 cairo_translate (cr, 0., y + height);
733 cairo_scale (cr, 1., -1.);
734 cairo_translate (cr, x, height);
735 cairo_rotate (cr, M_PI * 1.5);
736 temp = width;
737 width = height;
738 height = temp;
739 break;
740 case GTK_POS_LEFT:
741 cairo_translate (cr, x + width, y);
742 cairo_rotate (cr, M_PI * 0.5);
743 temp = width;
744 width = height;
745 height = temp;
746 break;
747 case GTK_POS_TOP:
748 cairo_translate (cr, x, y + height);
749 cairo_scale (cr, 1., -1.);
750 break;
751 default:
752 cairo_translate (cr, x, y);
753 break;
754 }
755
756 draw_top_bottom_background (bg, position, cr, width, height);
757
758 cairo_restore (cr);
759}
760
761static gboolean
762awn_background_lucido_get_needs_redraw (AwnBackground *bg,
763 GtkPositionType position,
764 GdkRectangle *area)
765{
766 /* Check default needs redraw */
767 gboolean nr = AWN_BACKGROUND_CLASS (awn_background_lucido_parent_class)->
768 get_needs_redraw (bg, position, area);
769 if (nr)
770 return TRUE;
771
772 /* Check expanders positions & sizes changed */
773 GList *widgets = _get_applet_widgets (bg);
774 GList *i = widgets;
775 GtkWidget *widget = NULL;
776 gint wcheck = 0;
777 gint ncheck = 0;
778
779 for (; i; i = i->next)
780 {
781 widget = GTK_WIDGET (i->data);
782
783 if (!GTK_IS_IMAGE (widget) || AWN_IS_SEPARATOR (widget))
784 {
785 /* if not expander continue */
786 continue;
787 }
788 switch (position)
789 {
790 case GTK_POS_BOTTOM:
791 case GTK_POS_TOP:
792 wcheck += (widget->allocation.x * 3) / 2 + widget->allocation.width;
793 break;
794 default:
795 wcheck += (widget->allocation.y * 3 ) / 2 + widget->allocation.height;
796 break;
797 }
798 ++ncheck;
799 }
800 g_list_free (widgets);
801
802 AwnBackgroundLucido *lbg = NULL;
803 lbg = AWN_BACKGROUND_LUCIDO (bg);
804 AwnBackgroundLucidoPrivate *priv;
805 priv = AWN_BACKGROUND_LUCIDO_GET_PRIVATE (lbg);
806 if (priv->expn != ncheck)
807 {
808 priv->expn = ncheck;
809 /* used to refresh bar */
810 awn_background_emit_padding_changed (bg);
811 }
812 if (priv->expw != wcheck)
813 {
814 priv->expw = wcheck;
815 return TRUE;
816 }
817 return FALSE;
818}
819
820static void
821awn_background_lucido_get_shape_mask (AwnBackground *bg,
822 cairo_t *cr,
823 GtkPositionType position,
824 GdkRectangle *area)
825{
826 gint temp;
827 gint x = area->x, y = area->y;
828 gint width = area->width, height = area->height;
829 gfloat align = 0.5;
830 gboolean expand = FALSE;
831
832 cairo_save (cr);
833
834 align = awn_background_get_panel_alignment (bg);
835 g_object_get (bg->panel, "expand", &expand, NULL);
836
837 switch (position)
838 {
839 case GTK_POS_RIGHT:
840 cairo_translate (cr, 0., y + height);
841 cairo_scale (cr, 1., -1.);
842 cairo_translate (cr, x, height);
843 cairo_rotate (cr, M_PI * 1.5);
844 temp = width;
845 width = height;
846 height = temp;
847 break;
848 case GTK_POS_LEFT:
849 cairo_translate (cr, x + width, y);
850 cairo_rotate (cr, M_PI * 0.5);
851 temp = width;
852 width = height;
853 height = temp;
854 break;
855 case GTK_POS_TOP:
856 cairo_translate (cr, x, y + height);
857 cairo_scale (cr, 1., -1.);
858 break;
859 default:
860 cairo_translate (cr, x, y);
861 break;
862 }
863 if (expand)
864 cairo_rectangle (cr, 0, 0, width, height + 2);
865 else
866 _create_path_lucido (bg, position, cr, 0, 0., width, height,
867 bg->stripe_width, bg->curviness,
868 bg->curviness, bg->curves_symmetry,
869 0, expand, align);
870 cairo_fill (cr);
871
872 cairo_restore (cr);
873}
874/* vim: set et ts=2 sts=2 sw=2 : */
0875
=== added file 'src/awn-background-lucido.h'
--- src/awn-background-lucido.h 1970-01-01 00:00:00 +0000
+++ src/awn-background-lucido.h 2010-05-31 17:25:42 +0000
@@ -0,0 +1,71 @@
1/*
2 * Copyright (C) 2009 Michal Hruby <michal.mhr@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Author : Alberto Aldegheri <albyrock87+dev@gmail.com>
19*/
20
21#ifndef _AWN_BACKGROUND_LUCIDO_H
22#define _AWN_BACKGROUND_LUCIDO_H
23
24#include <glib.h>
25#include <glib-object.h>
26#include <gtk/gtk.h>
27
28#include "awn-background.h"
29
30G_BEGIN_DECLS
31
32#define AWN_TYPE_BACKGROUND_LUCIDO (awn_background_lucido_get_type())
33
34#define AWN_BACKGROUND_LUCIDO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), AWN_TYPE_BACKGROUND_LUCIDO, \
35 AwnBackgroundLucido))
36
37#define AWN_BACKGROUND_LUCIDO_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), AWN_BACKGROUND_LUCIDO, \
38 AwnBackgroundLucidoClass))
39
40#define AWN_IS_BACKGROUND_LUCIDO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AWN_TYPE_BACKGROUND_LUCIDO))
41
42#define AWN_IS_BACKGROUND_LUCIDO_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), \
43 AWN_TYPE_BACKGROUND_LUCIDO))
44
45#define AWN_BACKGROUND_LUCIDO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
46 AWN_TYPE_BACKGROUND_LUCIDO, AwnBackgroundLucidoClass))
47
48typedef struct _AwnBackgroundLucido AwnBackgroundLucido;
49typedef struct _AwnBackgroundLucidoClass AwnBackgroundLucidoClass;
50typedef struct _AwnBackgroundLucidoPrivate AwnBackgroundLucidoPrivate;
51
52struct _AwnBackgroundLucido
53{
54 AwnBackground parent;
55 AwnBackgroundLucidoPrivate *priv;
56};
57
58struct _AwnBackgroundLucidoClass
59{
60 AwnBackgroundClass parent_class;
61};
62
63GType awn_background_lucido_get_type (void) G_GNUC_CONST;
64
65AwnBackground * awn_background_lucido_new (DesktopAgnosticConfigClient *client,
66 AwnPanel *panel);
67
68G_END_DECLS
69
70#endif /* _AWN_BACKGROUND_LUCIDO_H */
71
072
=== modified file 'src/awn-background.c'
--- src/awn-background.c 2010-04-08 15:38:05 +0000
+++ src/awn-background.c 2010-05-31 17:25:42 +0000
@@ -58,7 +58,8 @@
58 PROP_CORNER_RADIUS,58 PROP_CORNER_RADIUS,
59 PROP_PANEL_ANGLE,59 PROP_PANEL_ANGLE,
60 PROP_CURVINESS,60 PROP_CURVINESS,
61 PROP_CURVES_SYMEMETRY61 PROP_CURVES_SYMEMETRY,
62 PROP_STRIPE_WIDTH
62};63};
6364
64enum 65enum
@@ -90,6 +91,10 @@
90 GtkPositionType position,91 GtkPositionType position,
91 GdkRectangle *area);92 GdkRectangle *area);
9293
94static gboolean awn_background_get_needs_redraw (AwnBackground *bg,
95 GtkPositionType position,
96 GdkRectangle *area);
97
93static AwnPathType awn_background_path_default (AwnBackground *bg,98static AwnPathType awn_background_path_default (AwnBackground *bg,
94 gfloat *offset_mod);99 gfloat *offset_mod);
95100
@@ -186,6 +191,11 @@
186 object, "curves-symmetry", TRUE,191 object, "curves-symmetry", TRUE,
187 DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,192 DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
188 NULL);193 NULL);
194 desktop_agnostic_config_client_bind (bg->client,
195 AWN_GROUP_THEME, AWN_THEME_STRIPE_WIDTH,
196 object, "stripe-width", TRUE,
197 DESKTOP_AGNOSTIC_CONFIG_BIND_METHOD_FALLBACK,
198 NULL);
189}199}
190200
191static void201static void
@@ -342,12 +352,15 @@
342 case PROP_CURVES_SYMEMETRY:352 case PROP_CURVES_SYMEMETRY:
343 bg->curves_symmetry = g_value_get_float (value);353 bg->curves_symmetry = g_value_get_float (value);
344 break;354 break;
355 case PROP_STRIPE_WIDTH:
356 bg->stripe_width = g_value_get_float (value);
357 break;
345358
346 default:359 default:
347 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);360 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
348 return;361 return;
349 }362 }
350363 awn_background_invalidate (bg);
351 g_signal_emit (object, _bg_signals[CHANGED], 0);364 g_signal_emit (object, _bg_signals[CHANGED], 0);
352}365}
353366
@@ -380,6 +393,12 @@
380 if (bg->hilight_color) g_object_unref (bg->hilight_color);393 if (bg->hilight_color) g_object_unref (bg->hilight_color);
381 if (bg->sep_color) g_object_unref (bg->sep_color);394 if (bg->sep_color) g_object_unref (bg->sep_color);
382395
396 if (bg->helper_surface != NULL)
397 {
398 cairo_surface_finish (bg->helper_surface);
399 cairo_surface_destroy (bg->helper_surface);
400 }
401
383 G_OBJECT_CLASS (awn_background_parent_class)->finalize (object);402 G_OBJECT_CLASS (awn_background_parent_class)->finalize (object);
384}403}
385404
@@ -398,6 +417,7 @@
398 klass->get_input_shape_mask = awn_background_mask_none;417 klass->get_input_shape_mask = awn_background_mask_none;
399 klass->get_path_type = awn_background_path_default;418 klass->get_path_type = awn_background_path_default;
400 klass->get_strut_offsets = NULL;419 klass->get_strut_offsets = NULL;
420 klass->get_needs_redraw = awn_background_get_needs_redraw;
401421
402 /* Object properties */422 /* Object properties */
403 g_object_class_install_property (obj_class,423 g_object_class_install_property (obj_class,
@@ -575,6 +595,15 @@
575 0.0, 1.0, 0.5,595 0.0, 1.0, 0.5,
576 G_PARAM_READWRITE | G_PARAM_CONSTRUCT |596 G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
577 G_PARAM_STATIC_STRINGS));597 G_PARAM_STATIC_STRINGS));
598
599 g_object_class_install_property (obj_class,
600 PROP_STRIPE_WIDTH,
601 g_param_spec_float ("stripe-width",
602 "Stripe Width",
603 "The width of the stripe",
604 0.0, 1.0, 0.0,
605 G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
606 G_PARAM_STATIC_STRINGS));
578607
579 /* Add signals to the class */608 /* Add signals to the class */
580 _bg_signals[CHANGED] = 609 _bg_signals[CHANGED] =
@@ -650,6 +679,11 @@
650 bg->border_color = NULL;679 bg->border_color = NULL;
651 bg->hilight_color = NULL;680 bg->hilight_color = NULL;
652 bg->sep_color = NULL;681 bg->sep_color = NULL;
682 bg->needs_redraw = TRUE;
683 bg->helper_surface = NULL;
684 bg->cache_enabled = TRUE;
685 bg->last_height = 0;
686 bg->last_width = 0;
653}687}
654688
655void 689void
@@ -664,8 +698,40 @@
664 698
665 klass = AWN_BACKGROUND_GET_CLASS (bg);699 klass = AWN_BACKGROUND_GET_CLASS (bg);
666 g_return_if_fail (klass->draw != NULL);700 g_return_if_fail (klass->draw != NULL);
667701
668 klass->draw (bg, cr, position, area);702 /* Check if background caching is enabled - TRUE by default */
703 if (bg->cache_enabled)
704 {
705 g_return_if_fail (klass->get_needs_redraw != NULL);
706 cairo_save (cr);
707
708 /* Check if background needs to be redrawn */
709 if (klass->get_needs_redraw (bg, position, area))
710 {
711 /* Free last surface */
712 if (bg->helper_surface != NULL)
713 {
714 cairo_surface_finish (bg->helper_surface);
715 cairo_surface_destroy (bg->helper_surface);
716 }
717 /* Create new surface */
718 bg->helper_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
719 area->x + area->width,
720 area->y + area->height);
721 cairo_t* temp_cr = cairo_create (bg->helper_surface);
722 /* Draw background on temp cairo_t */
723 klass->draw (bg, temp_cr, position, area);
724 cairo_destroy (temp_cr);
725 }
726 /* Paint saved surface */
727 cairo_set_source_surface (cr, bg->helper_surface, 0., 0.);
728 cairo_paint(cr);
729 cairo_restore (cr);
730 }
731 else
732 {
733 klass->draw (bg, cr, position, area);
734 }
669}735}
670736
671void 737void
@@ -1009,4 +1075,25 @@
1009 return AWN_PATH_LINEAR;1075 return AWN_PATH_LINEAR;
1010}1076}
10111077
1078static gboolean awn_background_get_needs_redraw (AwnBackground *bg,
1079 GtkPositionType position,
1080 GdkRectangle *area)
1081{
1082 if (bg->needs_redraw == 1 ||
1083 bg->last_height != area->height ||
1084 bg->last_width != area->width)
1085 {
1086 bg->needs_redraw = 0;
1087 bg->last_height = area->height;
1088 bg->last_width = area->width;
1089 return TRUE;
1090 }
1091 return FALSE;
1092}
1093
1094void awn_background_invalidate (AwnBackground *bg)
1095{
1096 bg->needs_redraw = 1;
1097}
1098
1012/* vim: set et ts=2 sts=2 sw=2 : */1099/* vim: set et ts=2 sts=2 sw=2 : */
10131100
=== modified file 'src/awn-background.h'
--- src/awn-background.h 2010-03-07 18:38:07 +0000
+++ src/awn-background.h 2010-05-31 17:25:42 +0000
@@ -76,6 +76,15 @@
76 gfloat pattern_alpha;76 gfloat pattern_alpha;
77 GdkPixbuf *pattern_original;77 GdkPixbuf *pattern_original;
78 cairo_surface_t *pattern;78 cairo_surface_t *pattern;
79
80 /* Speedup code.
81 * We can save the bg and redraw only when properties changes
82 */
83 gboolean cache_enabled;
84 gboolean needs_redraw;
85 cairo_surface_t* helper_surface;
86 gint last_height;
87 gint last_width;
7988
80 /* FIXME:89 /* FIXME:
81 * These two should ultimately go somewhere else (once we do multiple panels)90 * These two should ultimately go somewhere else (once we do multiple panels)
@@ -89,6 +98,7 @@
89 gint panel_angle;98 gint panel_angle;
90 gfloat curviness;99 gfloat curviness;
91 gfloat curves_symmetry;100 gfloat curves_symmetry;
101 gfloat stripe_width;
92102
93 /* private */103 /* private */
94 guint changed;104 guint changed;
@@ -129,6 +139,10 @@
129 GdkRectangle *area,139 GdkRectangle *area,
130 gint *strut,140 gint *strut,
131 gint *strut_start, gint *strut_end);141 gint *strut_start, gint *strut_end);
142
143 gboolean (*get_needs_redraw) (AwnBackground *bg,
144 GtkPositionType position,
145 GdkRectangle *area);
132146
133 /*< signals >*/147 /*< signals >*/
134 void (*changed) (AwnBackground *bg);148 void (*changed) (AwnBackground *bg);
@@ -142,6 +156,8 @@
142 GtkPositionType position,156 GtkPositionType position,
143 GdkRectangle *area);157 GdkRectangle *area);
144158
159void awn_background_invalidate (AwnBackground *bg);
160
145void awn_background_padding_request (AwnBackground *bg,161void awn_background_padding_request (AwnBackground *bg,
146 GtkPositionType position,162 GtkPositionType position,
147 guint *padding_top,163 guint *padding_top,
148164
=== modified file 'src/awn-defines.h'
--- src/awn-defines.h 2010-02-06 13:34:02 +0000
+++ src/awn-defines.h 2010-05-31 17:25:42 +0000
@@ -87,6 +87,7 @@
87#define AWN_THEME_PANEL_ANGLE "panel_angle"87#define AWN_THEME_PANEL_ANGLE "panel_angle"
88#define AWN_THEME_CURVINESS "curviness"88#define AWN_THEME_CURVINESS "curviness"
89#define AWN_THEME_CURVES_SYMMETRY "curves_symmetry"89#define AWN_THEME_CURVES_SYMMETRY "curves_symmetry"
90#define AWN_THEME_STRIPE_WIDTH "stripe_width"
9091
91#endif /*_HAVE_AWN_DEFINES_H */92#endif /*_HAVE_AWN_DEFINES_H */
9293
9394
=== modified file 'src/awn-panel.c'
--- src/awn-panel.c 2010-05-29 17:17:22 +0000
+++ src/awn-panel.c 2010-05-31 17:25:42 +0000
@@ -43,6 +43,7 @@
43#include "awn-background-3d.h"43#include "awn-background-3d.h"
44#include "awn-background-curves.h"44#include "awn-background-curves.h"
45#include "awn-background-edgy.h"45#include "awn-background-edgy.h"
46#include "awn-background-lucido.h"
46#include "awn-background-floaty.h"47#include "awn-background-floaty.h"
47#include "awn-defines.h"48#include "awn-defines.h"
48#include "awn-marshal.h"49#include "awn-marshal.h"
@@ -222,6 +223,7 @@
222 STYLE_EDGY,223 STYLE_EDGY,
223 STYLE_FLOATY,224 STYLE_FLOATY,
224225
226 STYLE_LUCIDO,
225 STYLE_LAST227 STYLE_LAST
226};228};
227229
@@ -1075,6 +1077,9 @@
1075 }1077 }
10761078
1077 awn_panel_queue_masks_update (panel);1079 awn_panel_queue_masks_update (panel);
1080
1081 if (priv->bg)
1082 awn_background_invalidate (priv->bg);
1078}1083}
10791084
1080static1085static
@@ -1760,7 +1765,7 @@
1760 obj_class->finalize = awn_panel_finalize;1765 obj_class->finalize = awn_panel_finalize;
1761 obj_class->get_property = awn_panel_get_property;1766 obj_class->get_property = awn_panel_get_property;
1762 obj_class->set_property = awn_panel_set_property;1767 obj_class->set_property = awn_panel_set_property;
1763 1768
1764 cont_class->add = awn_panel_add;1769 cont_class->add = awn_panel_add;
1765 1770
1766 wid_class->expose_event = awn_panel_expose;1771 wid_class->expose_event = awn_panel_expose;
@@ -3179,6 +3184,9 @@
3179 case STYLE_EDGY:3184 case STYLE_EDGY:
3180 priv->bg = awn_background_edgy_new (priv->client, panel);3185 priv->bg = awn_background_edgy_new (priv->client, panel);
3181 break;3186 break;
3187 case STYLE_LUCIDO:
3188 priv->bg = awn_background_lucido_new (priv->client, panel);
3189 break;
3182 case STYLE_FLOATY:3190 case STYLE_FLOATY:
3183 priv->bg = awn_background_floaty_new (priv->client, panel);3191 priv->bg = awn_background_floaty_new (priv->client, panel);
3184 break;3192 break;

Subscribers

People subscribed via source and target branches