feat(前端界面): 优化滚动条样式,配色更轻盈协调
build.yaml / build (push) Successful in 40s

This commit is contained in:
xiaoqidun committed 2026-09-11 01:13:32 +08:00
1 parent a3435d5d8d
commit 04e5cd7071
3 files changed
+14 -4

No files matched your search

+7
View File
@@ -285,6 +285,13 @@ body[data-hide-meta] .meta-panel {
display: none; display: none;
} }
.page-list-panel,
.viewer-panel,
.meta-panel {
scrollbar-width: thin;
scrollbar-color: var(--line-strong) transparent;
}
.page-list-panel, .page-list-panel,
.meta-panel { .meta-panel {
min-height: 0; min-height: 0;
+1
View File
@@ -2517,6 +2517,7 @@ function scrollbarWidth() {
probe.style.width = "100px"; probe.style.width = "100px";
probe.style.height = "100px"; probe.style.height = "100px";
probe.style.overflow = "scroll"; probe.style.overflow = "scroll";
probe.style.scrollbarWidth = getComputedStyle(el.viewerPanel).scrollbarWidth;
probe.style.left = "-9999px"; probe.style.left = "-9999px";
document.body.append(probe); document.body.append(probe);
const width = probe.offsetWidth - probe.clientWidth; const width = probe.offsetWidth - probe.clientWidth;
+6 -4
View File
@@ -310,13 +310,15 @@ func imageWithTransparentEdge(img image.Image) (image.Image, int) {
src, ok := source.(*image.NRGBA) src, ok := source.(*image.NRGBA)
if ok { if ok {
srcBounds := src.Bounds() srcBounds := src.Bounds()
hasZero = src.Pix[3] == 0
hasVisible = !hasZero
scan:
for y := srcBounds.Min.Y; y < srcBounds.Max.Y; y++ { for y := srcBounds.Min.Y; y < srcBounds.Max.Y; y++ {
offset := src.PixOffset(srcBounds.Min.X, y) + 3 offset := src.PixOffset(srcBounds.Min.X, y) + 3
for x := 0; x < w; x++ { for x := 0; x < w; x++ {
if src.Pix[offset] == 0 { if (src.Pix[offset] == 0) != hasZero {
hasZero = true hasZero, hasVisible = true, true
} else { break scan
hasVisible = true
} }
offset += 4 offset += 4
} }