[gnome-shell/wip/paging-release2: 14/22] boxPointer, appDisplay: Add functions to query popup and boxpointer offsets
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging-release2: 14/22] boxPointer, appDisplay: Add functions to query popup and boxpointer offsets
- Date: Mon, 26 Aug 2013 13:15:46 +0000 (UTC)
commit 8f55a8e73c0eca339d10548aab081a06d1074da0
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Fri Aug 23 11:22:58 2013 +0200
boxPointer, appDisplay: Add functions to query popup and boxpointer offsets
It will be necesary in the upcomming patch with the new implementation
of the folder view, to maintain the view contained without cut off
the popup or the close button.
https://bugzilla.gnome.org/show_bug.cgi?id=706081
js/ui/appDisplay.js | 13 +++++++++++++
js/ui/boxpointer.js | 8 ++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index c7f9ff8..32ec9bd 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1074,6 +1074,19 @@ const AppFolderPopup = new Lang.Class({
BoxPointer.PopupAnimation.SLIDE);
this._isOpen = false;
this.emit('open-state-changed', false);
+ },
+
+ getOffset: function (element, side) {
+ let offset;
+ if (element == 'closeButtonOverlap')
+ offset = this.closeButton.get_theme_node().get_length('-shell-close-overlap-y');
+ else
+ if (element == 'arrowHeight')
+ offset = this._boxPointer.getArrowHeight();
+ else
+ if (element == 'padding')
+ offset = this._boxPointer.getPadding(side);
+ return offset;
}
});
Signals.addSignalMethods(AppFolderPopup.prototype);
diff --git a/js/ui/boxpointer.js b/js/ui/boxpointer.js
index 2fd1a67..833d299 100644
--- a/js/ui/boxpointer.js
+++ b/js/ui/boxpointer.js
@@ -639,5 +639,13 @@ const BoxPointer = new Lang.Class({
get opacity() {
return this.actor.opacity;
+ },
+
+ getPadding: function(side) {
+ return this.bin.get_theme_node().get_padding(side);
+ },
+
+ getArrowHeight: function() {
+ return this.actor.get_theme_node().get_length('-arrow-rise');
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]