diff options
Diffstat (limited to 'src/renderers/sliceRenderer.vala')
-rw-r--r-- | src/renderers/sliceRenderer.vala | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/renderers/sliceRenderer.vala b/src/renderers/sliceRenderer.vala index 61c50b1..4803070 100644 --- a/src/renderers/sliceRenderer.vala +++ b/src/renderers/sliceRenderer.vala @@ -20,7 +20,7 @@ using GLib.Math; namespace GnomePie { ///////////////////////////////////////////////////////////////////////// -/// Renders a Slice of a Pie. According to the current theme. +/// Renders a Slice of a Pie. According to the current theme. ///////////////////////////////////////////////////////////////////////// public class SliceRenderer : GLib.Object { @@ -123,7 +123,9 @@ public class SliceRenderer : GLib.Object { this.caption = new RenderedText(action.name, Config.global.theme.caption_width, Config.global.theme.caption_height, - Config.global.theme.caption_font); + Config.global.theme.caption_font, + Config.global.theme.caption_color, + Config.global.global_scale); this.active_icon = new ThemedIcon(action.icon, true); this.inactive_icon = new ThemedIcon(action.icon, false); @@ -138,7 +140,8 @@ public class SliceRenderer : GLib.Object { } this.hotkey = new RenderedText(hotkey_label, (int)Config.global.theme.slice_radius*2, - (int)Config.global.theme.slice_radius*2, "sans 20"); + (int)Config.global.theme.slice_radius*2, "sans 20", + Config.global.theme.caption_color, Config.global.global_scale); } ///////////////////////////////////////////////////////////////////// @@ -185,6 +188,13 @@ public class SliceRenderer : GLib.Object { ///////////////////////////////////////////////////////////////////// public void draw(double frame_time, Cairo.Context ctx, double angle, double distance) { + + // update the AnimatedValues + this.scale.update(frame_time); + this.alpha.update(frame_time); + this.fade.update(frame_time); + this.fade_scale.update(frame_time); + this.fade_rotation.update(frame_time); double direction = 2.0 * PI * position/parent.slice_count() + this.fade_rotation.val; double max_scale = 1.0/Config.global.theme.max_zoom; @@ -205,13 +215,6 @@ public class SliceRenderer : GLib.Object { if (fabs(this.scale.end - max_scale) > Config.global.theme.max_zoom*0.005) this.scale.reset_target(max_scale, Config.global.theme.transition_time); - // update the AnimatedValues - this.scale.update(frame_time); - this.alpha.update(frame_time); - this.fade.update(frame_time); - this.fade_scale.update(frame_time); - this.fade_rotation.update(frame_time); - ctx.save(); // distance from the center |