WebUI: Apply box-sizing reset

Box-sizing: border-box is now applied globally. A lot of tiny changes were made but they were necessary to correct resulting inconsistencies. Everything should be pretty much as it was with just some minor exceptions.

Looks like this PR also indirectly fixed #21414.

PR #21464.
This commit is contained in:
skomerko
2024-10-12 08:22:07 +02:00
committed by GitHub
parent 81509dfb65
commit 0704049026
29 changed files with 195 additions and 188 deletions

View File

@@ -367,7 +367,7 @@ window.qBittorrent.DynamicTable ??= (() => {
actions: actions,
menu: menuId,
offsets: {
x: -15,
x: 0,
y: 2
}
});
@@ -2109,7 +2109,7 @@ window.qBittorrent.DynamicTable ??= (() => {
const dirImg = new Element("img", {
src: "images/directory.svg",
styles: {
"width": 15,
"width": 20,
"padding-right": 5,
"margin-bottom": -3,
"margin-left": (node.depth * 20)
@@ -2442,7 +2442,7 @@ window.qBittorrent.DynamicTable ??= (() => {
const dirImg = new Element("img", {
src: "images/directory.svg",
styles: {
"width": 15,
"width": 20,
"padding-right": 5,
"margin-bottom": -3
},

View File

@@ -225,7 +225,7 @@ const initializeWindows = function() {
closable: true,
paddingVertical: 0,
paddingHorizontal: 0,
width: loadWindowWidth(id, 700),
width: loadWindowWidth(id, 730),
height: loadWindowHeight(id, 600),
onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => {
saveWindowSize(id);
@@ -292,7 +292,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 424,
height: 80
height: 100
});
};
@@ -311,7 +311,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 424,
height: 80
height: 100
});
}
};
@@ -352,7 +352,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 424,
height: 200
height: 220
});
}
};
@@ -428,7 +428,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 424,
height: 80
height: 100
});
};
@@ -465,7 +465,7 @@ const initializeWindows = function() {
paddingVertical: 0,
paddingHorizontal: 0,
width: 424,
height: 80
height: 100
});
}
};
@@ -1223,7 +1223,7 @@ const initializeWindows = function() {
toolbar: true,
toolbarURL: "views/aboutToolbar.html",
padding: 10,
width: loadWindowWidth(id, 550),
width: loadWindowWidth(id, 570),
height: loadWindowHeight(id, 360),
onResize: window.qBittorrent.Misc.createDebounceHandler(500, (e) => {
saveWindowSize(id);

View File

@@ -58,6 +58,7 @@ window.qBittorrent.ProgressBar ??= (() => {
"class": "progressbar_wrapper",
"styles": {
"border": "1px solid var(--color-border-default)",
"box-sizing": "content-box",
"width": vals.width,
"height": vals.height,
"position": "relative",
@@ -73,6 +74,7 @@ window.qBittorrent.ProgressBar ??= (() => {
"width": vals.width,
"height": vals.height,
"background": vals.darkbg,
"box-sizing": "content-box",
"color": vals.darkfg,
"position": "absolute",
"text-align": "center",
@@ -88,6 +90,7 @@ window.qBittorrent.ProgressBar ??= (() => {
"width": vals.width,
"height": vals.height,
"background": vals.lightbg,
"box-sizing": "content-box",
"color": vals.lightfg,
"position": "absolute",
"text-align": "center",

View File

@@ -608,7 +608,7 @@ window.qBittorrent.PropFiles ??= (() => {
}
},
offsets: {
x: -15,
x: 0,
y: 2
},
onShow: function() {

View File

@@ -37,7 +37,7 @@ window.qBittorrent.PropGeneral ??= (() => {
};
const piecesBar = new window.qBittorrent.PiecesBar.PiecesBar([], {
height: 16
height: 18
});
$("progress").appendChild(piecesBar);

View File

@@ -133,7 +133,7 @@ window.qBittorrent.PropPeers ??= (() => {
paddingVertical: 0,
paddingHorizontal: 0,
width: 350,
height: 240
height: 260
});
},
banPeer: function(element, ref) {
@@ -154,7 +154,7 @@ window.qBittorrent.PropPeers ??= (() => {
}
},
offsets: {
x: -15,
x: 0,
y: 2
},
onShow: function() {

View File

@@ -139,7 +139,7 @@ window.qBittorrent.PropTrackers ??= (() => {
}
},
offsets: {
x: -15,
x: 0,
y: 2
},
onShow: function() {
@@ -177,7 +177,7 @@ window.qBittorrent.PropTrackers ??= (() => {
paddingVertical: 0,
paddingHorizontal: 0,
width: 500,
height: 250,
height: 260,
onCloseComplete: function() {
updateData();
}

View File

@@ -111,7 +111,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
}
},
offsets: {
x: -15,
x: 0,
y: 2
},
onShow: function() {
@@ -150,7 +150,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
paddingVertical: 0,
paddingHorizontal: 0,
width: 500,
height: 250,
height: 260,
onCloseComplete: function() {
updateData();
}

View File

@@ -116,8 +116,8 @@ window.qBittorrent.Search ??= (() => {
OpenDescriptionUrl: openSearchTorrentDescriptionUrl
},
offsets: {
x: -15,
y: -53
x: 0,
y: -60
}
});
searchResultsTable = new window.qBittorrent.DynamicTable.SearchResultsTable();
@@ -184,9 +184,8 @@ window.qBittorrent.Search ??= (() => {
alt: "QBT_TR(Close tab)QBT_TR[CONTEXT=SearchWidget]",
title: "QBT_TR(Close tab)QBT_TR[CONTEXT=SearchWidget]",
src: "images/application-exit.svg",
width: "8",
height: "8",
style: "padding-right: 7px; margin-bottom: -1px; margin-left: -5px",
width: "10",
height: "10",
onclick: "qBittorrent.Search.closeSearchTab(this);",
});
closeTabElem.inject(tabElem, "top");
@@ -384,9 +383,8 @@ window.qBittorrent.Search ??= (() => {
title: text,
src: image,
class: "statusIcon",
width: "10",
height: "10",
style: "margin-bottom: -2px; margin-left: 7px",
width: "12",
height: "12",
});
};