pageIndicators: Use Clutter.Orientation as orientation parameter
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
This commit is contained in:
parent
c9fbae3408
commit
e4920b2f80
@ -906,7 +906,9 @@ var EmojiSelection = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
this.add(this._emojiPager, { expand: true });
|
this.add(this._emojiPager, { expand: true });
|
||||||
|
|
||||||
this._pageIndicator = new PageIndicators.PageIndicators(false);
|
this._pageIndicator = new PageIndicators.PageIndicators(
|
||||||
|
Clutter.Orientation.HORIZONTAL
|
||||||
|
);
|
||||||
this.add(this._pageIndicator, { expand: true, x_fill: false, y_fill: false });
|
this.add(this._pageIndicator, { expand: true, x_fill: false, y_fill: false });
|
||||||
this._pageIndicator.setReactive(false);
|
this._pageIndicator.setReactive(false);
|
||||||
|
|
||||||
|
@ -20,14 +20,17 @@ var ANIMATION_DELAY = 100;
|
|||||||
var PageIndicators = GObject.registerClass({
|
var PageIndicators = GObject.registerClass({
|
||||||
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } }
|
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } }
|
||||||
}, class PageIndicators extends St.BoxLayout {
|
}, class PageIndicators extends St.BoxLayout {
|
||||||
_init(vertical = true) {
|
_init(orientation = Clutter.Orientation.VERTICAL) {
|
||||||
super._init({ style_class: 'page-indicators',
|
let vertical = orientation == Clutter.Orientation.VERTICAL;
|
||||||
vertical,
|
super._init({
|
||||||
x_expand: true, y_expand: true,
|
style_class: 'page-indicators',
|
||||||
x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
|
vertical,
|
||||||
y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
|
x_expand: true, y_expand: true,
|
||||||
reactive: true,
|
x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
|
||||||
clip_to_allocation: true });
|
y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
|
||||||
|
reactive: true,
|
||||||
|
clip_to_allocation: true
|
||||||
|
});
|
||||||
this._nPages = 0;
|
this._nPages = 0;
|
||||||
this._currentPage = undefined;
|
this._currentPage = undefined;
|
||||||
this._reactive = true;
|
this._reactive = true;
|
||||||
@ -93,7 +96,7 @@ var PageIndicators = GObject.registerClass({
|
|||||||
var AnimatedPageIndicators = GObject.registerClass(
|
var AnimatedPageIndicators = GObject.registerClass(
|
||||||
class AnimatedPageIndicators extends PageIndicators {
|
class AnimatedPageIndicators extends PageIndicators {
|
||||||
_init() {
|
_init() {
|
||||||
super._init(true);
|
super._init();
|
||||||
|
|
||||||
this.connect('notify::mapped', () => {
|
this.connect('notify::mapped', () => {
|
||||||
if (!this.mapped)
|
if (!this.mapped)
|
||||||
|
Loading…
Reference in New Issue
Block a user