Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request]: make label position configurable #36

Open
freder opened this issue Aug 8, 2021 · 3 comments
Open

[feature request]: make label position configurable #36

freder opened this issue Aug 8, 2021 · 3 comments

Comments

@freder
Copy link

freder commented Aug 8, 2021

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
Copy link

drdo commented Sep 2, 2021

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
Copy link
Author

freder commented Sep 14, 2021

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants