From c3efc938f0ffc4e5aab500992ca71c66271bf352 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Sun, 9 Mar 2025 11:01:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E7=89=88=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/control.js | 22 ++++++++++++++++------ libs/core.js | 4 ---- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/libs/control.js b/libs/control.js index dfc71552..9fdd6898 100644 --- a/libs/control.js +++ b/libs/control.js @@ -3352,11 +3352,10 @@ control.prototype.setToolbarButton = function (useButton) { } else core.statusBar.image.shop.style.display = "none"; - if (!core.flags.showHard) { - ["rollback", "undoRollback"].forEach(function (t) { - core.statusBar.image[t].style.display = 'block'; - }); - } + ["rollback", "undoRollback"].forEach(function (t) { + core.statusBar.image[t].style.display = core.flags.showHard ? "none" : "block"; + }); + core.statusBar.image.keyboard.style.display = core.domStyle.isVertical || core.flags.extendToolbar ? "block" : "none"; } @@ -3485,6 +3484,14 @@ control.prototype.resize = function () { is15x15: core.__SIZE__ == 15 }; + // 横屏且非底部工具栏,则商店调整到回退按键之前 + if (!core.domStyle.isVertical && !core.flags.extendsToolBar) { + if (core.statusBar.image.shop.nextElementSibling !== core.statusBar.image.rollback) + core.dom.toolBar.insertBefore(core.statusBar.image.shop, core.statusBar.image.rollback); + } + else if (core.statusBar.image.shop.nextElementSibling !== core.statusBar.image.save) + core.dom.toolBar.insertBefore(core.statusBar.image.shop, core.statusBar.image.save); + this._doResize(obj); this.setToolbarButton(); core.updateStatusBar(); @@ -3707,7 +3714,10 @@ control.prototype._resize_tools = function (obj) { core.dom.hard.style.lineHeight = toolsHeight + "px"; if (core.domStyle.isVertical || obj.extendToolbar) { if (core.flags.showHard) core.dom.hard.style.width = obj.outerSize - 9 * toolsMarginLeft - 8.5 * toolsHeight - 22 + "px"; - else core.dom.hard.style.width = "10px"; + else { + core.dom.hard.style.width = "15px"; + core.dom.hard.style.marginLeft = "1px"; + } } else { core.dom.hard.style.width = obj.BAR_WIDTH * core.domStyle.scale - 9 - 2 * toolsMarginLeft + "px"; diff --git a/libs/core.js b/libs/core.js index 4cff63f8..6a896b0a 100644 --- a/libs/core.js +++ b/libs/core.js @@ -287,10 +287,6 @@ core.prototype.init = function (coreData, callback) { }); core.dom.musicBtn.style.display = 'block'; - // 横屏且非底部工具栏,则商店调整到回退按键之前 - if (!core.domStyle.isVertical && !core.flags.extendsToolBar) { - core.dom.toolBar.insertBefore(core.statusBar.image.shop, core.statusBar.image.rollback) - } core.setMusicBtn(); }