replace deprecated St.ScrollView.vscroll

patch by @darkblaze69
This commit is contained in:
Philipp Unger
2024-03-07 23:16:27 +01:00
parent 4c014b00b4
commit 99812f26ea
3 changed files with 6 additions and 6 deletions

View File

@@ -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;

View File

@@ -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();

View File

@@ -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];
}