Skip to content

Commit 00f754f

Browse files
committed
add scrollbar to projects panel
1 parent 8981571 commit 00f754f

7 files changed

Lines changed: 48 additions & 36 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "dtm",
33
"author": "kcjerrell",
44
"private": true,
5-
"version": "0.4.0",
5+
"version": "0.4.1",
66
"type": "module",
77
"scripts": {
88
"dev": "tauri dev",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["migration", "entity", ".", "fpzip-sys", "macros"]
33

44
[package]
55
name = "dtm"
6-
version = "0.4.0"
6+
version = "0.4.1"
77
description = "A little app for reading Draw Things Metadata"
88
authors = ["kcjerrell"]
99
edition = "2021"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "DTM",
4-
"version": "0.4.0",
4+
"version": "0.4.1",
55
"identifier": "com.kcjer.dtm",
66
"build": {
77
"beforeDevCommand": "vite",

src/components/PanelList2.tsx

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -91,37 +91,37 @@ function PanelList<T extends Selectable>(props: PanelListComponentProps<T>) {
9191
id={"plcontiner"}
9292
data-top="0"
9393
data-bottom="0"
94-
css={{
95-
"--top": "0px",
96-
"--bottom": "0px",
97-
98-
maskImage: `
99-
linear-gradient(
100-
to bottom,
101-
transparent,
102-
black var(--top),
103-
black calc(100% - var(--bottom)),
104-
transparent
105-
)
106-
`,
107-
WebkitMaskImage: `
108-
linear-gradient(
109-
to bottom,
110-
transparent,
111-
black var(--top),
112-
black calc(100% - var(--bottom)),
113-
transparent
114-
)
115-
`,
116-
117-
'&[data-top="1"]': {
118-
"--top": "16px",
119-
},
120-
121-
'&[data-bottom="1"]': {
122-
"--bottom": "16px",
123-
},
124-
}}
94+
// css={{
95+
// "--top": "0px",
96+
// "--bottom": "0px",
97+
98+
// maskImage: `
99+
// linear-gradient(
100+
// to bottom,
101+
// transparent,
102+
// black var(--top),
103+
// black calc(100% - var(--bottom)),
104+
// transparent
105+
// )
106+
// `,
107+
// WebkitMaskImage: `
108+
// linear-gradient(
109+
// to bottom,
110+
// transparent,
111+
// black var(--top),
112+
// black calc(100% - var(--bottom)),
113+
// transparent
114+
// )
115+
// `,
116+
117+
// '&[data-top="1"]': {
118+
// "--top": "16px",
119+
// },
120+
121+
// '&[data-bottom="1"]': {
122+
// "--bottom": "16px",
123+
// },
124+
// }}
125125
>
126126
<PanelListScrollContent id={"plcontent"}>{children}</PanelListScrollContent>
127127
</PaneListScrollContainer>

src/components/common.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export const PaneListScrollContainer = chakra(
166166
},
167167
},
168168
},
169-
{ defaultProps: { className: "hide-scrollbar" } },
169+
{ defaultProps: { className: "panel-scroll-square" } },
170170
)
171171

172172
export const PanelListScrollContent = chakra("div", {

src/theme/theme.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ const themeConfig = defineConfig({
7777
borderColor: "bg.1",
7878
},
7979
},
80+
".panel-scroll-square": {
81+
// scrollbarGutter: "stable",
82+
_scrollbar: { backgroundColor: "none", width: "8px", borderRadius: "2px" },
83+
_scrollbarThumb: {
84+
backgroundColor: "fg.2/50",
85+
width: "4px",
86+
borderRadius: "2px",
87+
boxShadow: "pane1",
88+
borderRight: "1px solid",
89+
borderColor: "bg.1",
90+
},
91+
},
8092
"#root": {
8193
bgColor: "#73747540",
8294
overflow: "clip",

0 commit comments

Comments
 (0)