nathanielsimard / overview-navigation

Make window navigation fast and easy using overview.
https://extensions.gnome.org/extension/1702/overview-navigation/
GNU General Public License v2.0
37 stars 7 forks source link

[feature request]: make label position configurable #36

Open freder opened 3 years ago

freder commented 3 years ago

in the simplest case one could let the user choose from a number of predefined positions: overview-navigation-placement

I personally would like to place them right above the application icon.

drdo commented 3 years ago

I second this. I have a problem where the label is obscured by the window title when the mouse happens to be over the window above in overview mode. Example:

image

freder commented 3 years ago

don't have time for a proper PR atm, but I figured out how to do it:

var Label = class Label {
  constructor (settings, parent) {
    this.settings = settings
    this.gLabel = new St.Label({ })
    this.gLabel.set_style_class_name(FOCUS_WINDOW_STYLE)

    // align with parent element
    this.gLabel.add_constraint(new Clutter.AlignConstraint({
      source: parent,
      align_axis: Clutter.AlignAxis.X_AXIS,
      factor: 0.5,
    }));
    this.gLabel.add_constraint(new Clutter.AlignConstraint({
      source: parent,
      align_axis: Clutter.AlignAxis.Y_AXIS,
      // pivot_point: new Graphene.Point({ x: 0.5, y: 1.0 }),
      factor: 1.0,
    }));
    parent.add_child(this.gLabel)

    // add offset
    this.gLabel.translation_x = -50;
    this.gLabel.translation_y = -2;
  }
// ...
nathanielsimard commented 3 years ago

I'm pretty busy atm too, but would be happy to review a PR when you'll have the time :)