Merge lp://staging/~marten-truu/plank/optional-gradients into lp://staging/plank

Proposed by truu
Status: Needs review
Proposed branch: lp://staging/~marten-truu/plank/optional-gradients
Merge into: lp://staging/plank
Diff against target: 374 lines (+211/-30)
6 files modified
data/themes/Glowless/dock.theme (+70/-0)
data/themes/Makefile.am (+5/-0)
lib/DockRenderer.vala (+5/-5)
lib/Drawing/DockTheme.vala (+106/-22)
lib/Items/Enums.vala (+22/-0)
tests/Drawing.vala (+3/-3)
To merge this branch: bzr merge lp://staging/~marten-truu/plank/optional-gradients
Reviewer Review Type Date Requested Status
Rico Tzschichholz Needs Information
Review via email: mp+290819@code.staging.launchpad.net

Description of the change

Pictures should explain the mess I've made better: https://github.com/MellowKing/plank
It's a link to an earlier modification, but the new options look the same except for the additional option of a solid active item background.

Hopefully something like this would be welcome in plank for people who prefer their dock non-glowy. :)

To post a comment you must log in.
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

Interesting, some quick notes to begin with and this might go through some iterations ;-)

We want to keep it simple and "IndicatorStyle", "IndicatorColor" and "IndicatorSize" should be enough information to draw it. No need for "IndicatorSpacing" and "IndicatorHeight"!

"IndicatorStyle" should be an Enum.

Changes of Theme.vala should be in DockTheme.vala as well.

Btw, the official git repo is https://git.launchpad.net/plank/ (Mirrored to https://github.com/ricotz/plank)

review: Needs Information
Revision history for this message
truu (marten-truu) wrote :

Cool, I'll use git instead then. ^^

I'll try to remove possible need for spacing with bigger circles and see whether height or width could be in relation to something to remove the need for a height setting for underline type indicators.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

bzr merges are still preferred though. Of course you can keep developing in git.

Revision history for this message
truu (marten-truu) wrote :

Oh. :D I'll just keep using bzr for this then.

1550. By truu

Removed Spacing and Height options, probably created a weird style enum in a weird place and put some things where they should've been put all along.

Revision history for this message
truu (marten-truu) wrote :

In case of the circle indicator the size is a 50th of the icon size as opposed to a 10th, but it looks roughly the right size when compared to the other indicators. Not sure yet what to do about that.

1551. By truu

Removed now unnecessary space additions.

1552. By truu

Gave the active item gradientless background a smooth transition as well.

Revision history for this message
Rico Tzschichholz (ricotz) wrote :
Revision history for this message
Rico Tzschichholz (ricotz) wrote :

IndicatorStyleType.LINE requires rotation support for LEFT/RIGHT docks

1553. By truu

Initial fix for lines when placed to the right and left.

Revision history for this message
truu (marten-truu) wrote :

I noticed the lines already look nice in the indicator-style branch :D

In my opinion the circles could use a slight boost off the ground and since this branch is pretty outdated now, I'll just paste the idea here. :D

=== modified file 'lib/Drawing/DockTheme.vala'
--- lib/Drawing/DockTheme.vala 2016-04-04 13:50:32 +0000
+++ lib/Drawing/DockTheme.vala 2016-04-04 18:58:53 +0000
@@ -226,6 +226,10 @@
   {
    // Force square if needed which eases the placement in renderer
    switch (IndicatorStyle) {
+ case IndicatorStyleType.CIRCLE:
+ height = height + height / 2;
+ width = height;
+ break;
    case IndicatorStyleType.LINE:
     if (position == Gtk.PositionType.LEFT
      || position == Gtk.PositionType.RIGHT) {
@@ -273,7 +277,7 @@
    case IndicatorStyleType.CIRCLE:
     var x = height / 2, y = x;
     cr.move_to (x, y);
- cr.arc (x, y, height / 2, 0, Math.PI * 2);
+ cr.arc (x, y, height / 3, 0, Math.PI * 2);
     cr.close_path ();
     cr.set_source_rgba (color.red, color.green, color.blue, color.alpha);
     break;

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

To accomplish that there is offset_factor, but I am struggling with implementation details while this hole thing is a bit hacky and needs some further thinking.

Revision history for this message
truu (marten-truu) wrote :

Oh. Well if I can be of service with that somehow, I'd be happy to help. :)

Unmerged revisions

1553. By truu

Initial fix for lines when placed to the right and left.

1552. By truu

Gave the active item gradientless background a smooth transition as well.

1551. By truu

Removed now unnecessary space additions.

1550. By truu

Removed Spacing and Height options, probably created a weird style enum in a weird place and put some things where they should've been put all along.

1549. By truu

Add missing newline.

1548. By truu

Makes gradients optional by adding a few theming options.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: