mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
replace deprecated St.ScrollView.vscroll
patch by @darkblaze69
This commit is contained in:
@@ -142,7 +142,7 @@ export const TaskbarActor = GObject.registerClass({
|
||||
|
||||
scrollview.allocate(childBox);
|
||||
|
||||
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
|
||||
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'adjustment'].get_values();
|
||||
upper = Math.floor(upper);
|
||||
scrollview._dtpFadeSize = upper > pageSize ? this._delegate.iconSize : 0;
|
||||
|
||||
@@ -277,7 +277,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
x_align: rtl ? Clutter.ActorAlign.END : Clutter.ActorAlign.START
|
||||
});
|
||||
|
||||
let adjustment = this._scrollView[orientation[0] + 'scroll'].adjustment;
|
||||
const adjustment = this._scrollView[orientation[0] + 'adjustment'];
|
||||
|
||||
this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this));
|
||||
|
||||
@@ -514,7 +514,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
let adjustment, delta;
|
||||
|
||||
adjustment = this._scrollView[orientation[0] + 'scroll'].get_adjustment();
|
||||
adjustment = this._scrollView[orientation[0] + 'adjustment'];
|
||||
|
||||
let increment = adjustment.step_increment;
|
||||
|
||||
|
||||
4
utils.js
4
utils.js
@@ -505,8 +505,8 @@ export const notify = function(text, iconName, action, isTransient) {
|
||||
* Return the amount of shift applied
|
||||
*/
|
||||
export const ensureActorVisibleInScrollView = function(scrollView, actor, fadeSize, onComplete) {
|
||||
let vadjustment = scrollView.vscroll.adjustment;
|
||||
let hadjustment = scrollView.hscroll.adjustment;
|
||||
const vadjustment = scrollView.vadjustment;
|
||||
const hadjustment = scrollView.hadjustment;
|
||||
let [vvalue, vlower, vupper, vstepIncrement, vpageIncrement, vpageSize] = vadjustment.get_values();
|
||||
let [hvalue, hlower, hupper, hstepIncrement, hpageIncrement, hpageSize] = hadjustment.get_values();
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ export const PreviewMenu = GObject.registerClass({
|
||||
}
|
||||
|
||||
_getScrollAdjustmentValues() {
|
||||
let [value , , upper, , , pageSize] = this._scrollView[(this.isVertical ? 'v' : 'h') + 'scroll'].adjustment.get_values();
|
||||
let [value , , upper, , , pageSize] = this._scrollView[(this.isVertical ? 'v' : 'h') + 'adjustment'].get_values();
|
||||
|
||||
return [value, upper, pageSize];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user