Skip to content

Commit

Permalink
Use Graphene for indicator rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlsh committed Apr 5, 2021
1 parent 2ee5050 commit 1c49046
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions appIconIndicators.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Cogl = imports.gi.Cogl;
const Cairo = imports.cairo;
const Clutter = imports.gi.Clutter;
const GdkPixbuf = imports.gi.GdkPixbuf
const Gio = imports.gi.Gio;
const Graphene = imports.gi.Graphene;
const Gtk = imports.gi.Gtk;
const Main = imports.ui.main;
const Pango = imports.gi.Pango;
Expand Down Expand Up @@ -279,13 +279,15 @@ var RunningIndicatorDots = class DashToDock_RunningIndicatorDots extends Running
//set center of rotatoins to the center
this._area.set_pivot_point(0.5, 0.5);
// prepare transformation matrix
let m = new Cogl.Matrix();
let m = new Graphene.Matrix();
m.init_identity();
let v = new Graphene.Vec3();
v.init(0, 0, 1);

switch (this._side) {
case St.Side.TOP:
m.xx = -1;
m.rotate(180, 0, 0, 1);
m.xx = -1;
m.rotate(180, v);
break

case St.Side.BOTTOM:
Expand All @@ -294,11 +296,11 @@ var RunningIndicatorDots = class DashToDock_RunningIndicatorDots extends Running

case St.Side.LEFT:
m.yy = -1;
m.rotate(90, 0, 0, 1);
m.rotate(90, v);
break;

case St.Side.RIGHT:
m.rotate(-90, 0, 0, 1);
m.rotate(-90, v);
break
}

Expand Down

0 comments on commit 1c49046

Please sign in to comment.