From 737a79f44c9c57c8aabc2314f0ea02609986fc26 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Thu, 30 May 2024 16:43:51 +0800 Subject: [PATCH] style(css): update scrollbar styles Updated scrollbar styles in App.css to customize appearance and behavior: - Set width and height for scrollbar - Defined background colors for track and thumb - Added hover effect for scrollbar thumb No breaking changes introduced. --- src/main/index.ts | 2 ++ .../src/{assets/css/base.css => App.css} | 17 +++++++++++++ src/renderer/src/assets/wavy-lines.svg | 25 ------------------- src/renderer/src/main.tsx | 3 +-- .../pages/home/components/Conversations.tsx | 3 +++ 5 files changed, 23 insertions(+), 27 deletions(-) rename src/renderer/src/{assets/css/base.css => App.css} (90%) delete mode 100644 src/renderer/src/assets/wavy-lines.svg diff --git a/src/main/index.ts b/src/main/index.ts index 1f951bbc..edd72467 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -18,6 +18,8 @@ function createWindow(): void { y: mainWindowState.y, width: mainWindowState.width, height: mainWindowState.height, + minWidth: 800, + minHeight: 500, show: false, autoHideMenuBar: true, titleBarStyle: 'hiddenInset', diff --git a/src/renderer/src/assets/css/base.css b/src/renderer/src/App.css similarity index 90% rename from src/renderer/src/assets/css/base.css rename to src/renderer/src/App.css index 8fb18dc2..5f626305 100644 --- a/src/renderer/src/assets/css/base.css +++ b/src/renderer/src/App.css @@ -115,3 +115,20 @@ body, flex-direction: row; flex: 1; } + +::-webkit-scrollbar { + width: 5px; + height: 5px; +} + +::-webkit-scrollbar-track { + background-color: #292f34; +} + +::-webkit-scrollbar-thumb { + background-color: #444c51; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #444c51; +} diff --git a/src/renderer/src/assets/wavy-lines.svg b/src/renderer/src/assets/wavy-lines.svg deleted file mode 100644 index d08c6119..00000000 --- a/src/renderer/src/assets/wavy-lines.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index df428be3..bac1791f 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -1,5 +1,4 @@ -import './assets/css/base.css' - +import './App.css' import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' diff --git a/src/renderer/src/pages/home/components/Conversations.tsx b/src/renderer/src/pages/home/components/Conversations.tsx index 9ba78b3a..bf0c1613 100644 --- a/src/renderer/src/pages/home/components/Conversations.tsx +++ b/src/renderer/src/pages/home/components/Conversations.tsx @@ -33,6 +33,9 @@ const Container = styled.div` height: calc(100vh - var(--navbar-height) - var(--status-bar-height)); padding: 10px; overflow-y: scroll; + &::-webkit-scrollbar { + display: none; + } ` const Conversation = styled.div`