summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2019-09-10 07:36:58 +0200
committerFlorian Müllner <florian.muellner@gmail.com>2019-10-16 15:26:13 +0000
commite4920b2f80c096b8c30f55f54cfe2a2f29fc542e (patch)
tree8580d0c3c3b67042893c3adc1a64631d8133c120
parentc9fbae3408ba444f2d63add6a4c90b1bb6c2ad53 (diff)
downloadgnome-shell-e4920b2f80c096b8c30f55f54cfe2a2f29fc542e.tar.gz
pageIndicators: Use Clutter.Orientation as orientation parameter
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/559
-rw-r--r--js/ui/keyboard.js4
-rw-r--r--js/ui/pageIndicators.js21
2 files changed, 15 insertions, 10 deletions
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index 2f66c240a..d7a6999b2 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -906,7 +906,9 @@ var EmojiSelection = GObject.registerClass({
});
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._pageIndicator.setReactive(false);
diff --git a/js/ui/pageIndicators.js b/js/ui/pageIndicators.js
index 8d81fd0f3..5ed7f879d 100644
--- a/js/ui/pageIndicators.js
+++ b/js/ui/pageIndicators.js
@@ -20,14 +20,17 @@ var ANIMATION_DELAY = 100;
var PageIndicators = GObject.registerClass({
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } }
}, class PageIndicators extends St.BoxLayout {
- _init(vertical = true) {
- super._init({ style_class: 'page-indicators',
- vertical,
- x_expand: true, y_expand: true,
- x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
- y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
- reactive: true,
- clip_to_allocation: true });
+ _init(orientation = Clutter.Orientation.VERTICAL) {
+ let vertical = orientation == Clutter.Orientation.VERTICAL;
+ super._init({
+ style_class: 'page-indicators',
+ vertical,
+ x_expand: true, y_expand: true,
+ x_align: vertical ? Clutter.ActorAlign.END : Clutter.ActorAlign.CENTER,
+ y_align: vertical ? Clutter.ActorAlign.CENTER : Clutter.ActorAlign.END,
+ reactive: true,
+ clip_to_allocation: true
+ });
this._nPages = 0;
this._currentPage = undefined;
this._reactive = true;
@@ -93,7 +96,7 @@ var PageIndicators = GObject.registerClass({
var AnimatedPageIndicators = GObject.registerClass(
class AnimatedPageIndicators extends PageIndicators {
_init() {
- super._init(true);
+ super._init();
this.connect('notify::mapped', () => {
if (!this.mapped)