![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
scroll bar confusion
Using Sigil 2.3.1 on Linux, W10 and MacBook M2
Working exceptionally on my W10 box doing some extensive editing, I found I was getting erratic behaviour when trying to scroll up and down in the various windows. Eventually, I questioned what I was doing and then found I was being 'mislead' by the scroll bar handles' colours. On Windows and Linux. the handles we grab on the scroll bar of the Clips, Book Browser and Table Of Contents windows are a light colour but in the Preview window, it is a darker colour. This was leading me to click on the wrong part several times. On the contrary, the scroll bar handles on all the windows of the MacBook are a nice dark colour which contrasts better with the background than those on Windows or Linux. It would be good if they were all the same colour on Windows and Linux and preferably dark like on the Mac. I imagine that it's something I could change with an entry in the Qt CSS if I knew how. |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Well, in Sigil Linux, I managed to get better visibility of the scroll bar/handles on Clips, Browser, Code View and TOC windows but not the Preview window.
How does one address the Preview window separately? |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
|
On MacOS, all scrollbars inherit their colours from the operating system light/versus dark colour palette.
For dark mode you can see examples of css used to modify the scrollbars on each platform here: https://github.com/Sigil-Ebook/Sigil...rce_Files/dark Check out examples of css in win_dark_scrollbar.css, lin_dark_scrollbar.css and mac_dark_scrollbar.css You can add custom css that Preview loads and even cycle among them. Last edited by KevinH; 12-21-2024 at 11:12 AM. |
![]() |
![]() |
![]() |
#4 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
I've no use for dark mode on any machine and my MacBook is in light mode and its scroll bars are all fine. I would just like all the scrollbars in Linux and Windows to have the same logic - a darker button/handle and a lighter scroll bar. Preview is the odd one out on both machines. I've tried using the code from lin_dark_scrollbar.css. The colors aren't a problem I can easily change them. But do I need to rename the file to get Preview to take it into account when starting Sigil? |
|
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,760
Karma: 5706256
Join Date: Nov 2009
Device: many
|
Put a css file called custom_preview_style.css into your Sigil's Preferences folder.
It will be injected into Preview. You can also create a css file called custom_preview_style_alt.css and use the Preview's cycle CSS Styles icon to swap rapidly between them. You control it with the cycle icon. Last edited by KevinH; 12-21-2024 at 05:04 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
Others may find it gaudy or in poor taste - but I'm happy. |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Preview is technically a Chrome browser. That's why the scrollbars need to be styled like you'd style the scrollbars on a web page (rather than Qt's qss). I'll try to see if there's a way to automatically use the current QPalette to match the Qt style.
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm curious now. You claim to have no use for dark mode on any machine, yet dark mode is the only time on Linux or Windows that we (Sigil) attempt to modify the Preview scrollbars with css. In light mode, we go with whatever Qt decides.
I can confirm, however, that the css we inject into Preview on Linux in dark mode (for the scrollbars) is inappropriate. It's based upon the colors that we used to use for our own hard coded dark mode that we no longer use on Linux. Since we allow Sigil to use the theme that the Linux Desktop is using, we need to find a way for Sigil to use the default system theme colors (for Preview scrollbars) when dark mode is detected. |
![]() |
![]() |
![]() |
#9 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
My initial grief in this thread was that the cursor handle on Preview in Linux and Windows was darker grey against a lighter grey scroll bar background whereas it was the opposite on all Sigil's other windows. It wasn't the color grey that caused the problem it was the incoherency between the colors of Preview's scrollbar handle and the other windows. In general, applications on my Linux and Windows boxes seem to have a darker grey scroll handle against a lighter grey background. The contrast is better on Windows than on Linux. Using some of the code suggested by Kevin (lin_dark_scrollbar.css) and changing the colors, I was able to get a scrollbar display that suited me and was coherent across all Sigil's windows in my Linux, Windows and MacBook machines. So I'm glad I asked. |
|
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It should be fairly easy to solve on Windows, but a different story on Linux: where theming isn't just limited to a binary light/dark scenario. I'll first need to identify which of the QPalette color roles are used for the various Qt widget scrollbar pieces to have a good shot at matching them with css. Certainly not the highest priority since users can always do what you did to match them using custom preview css.
|
![]() |
![]() |
![]() |
#11 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
|
![]() |
![]() |
![]() |
#12 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
|
I very much like the look of that! Could you share the .css file that you use, please and thank you?
|
![]() |
![]() |
![]() |
#13 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 265
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
The rest is essentially one of the files referenced by Kevin on github earlier in this thread - (lin_dark_scrollbar.css). I just commented out parts that didn't interest me, changed the values of some width and height parameters and changed the colours. So I don't claim any credit for the code. It doesn't look like CSS files can be attached so here's a link to Dropbox: Dropbox link removed - see Turtle91's post next where code is pasted. Last edited by philja; 12-30-2024 at 08:10 AM. |
|
![]() |
![]() |
![]() |
#14 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Spoiler:
|
|
![]() |
![]() |
![]() |
#15 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
|
Thanks, Philja!
|
![]() |
![]() |
![]() |
Tags |
user interface |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing color of scroll bar? | Joseph The Grave | Calibre | 7 | 08-02-2024 01:50 AM |
Viewer scroll bar Calibre 4.0 | qfwfq | Calibre | 1 | 10-04-2019 10:26 AM |
Scroll bar visibility | AMF | Calibre | 6 | 08-10-2019 12:09 AM |
Options for page scroll bar? | ShellShock | Marvin | 3 | 12-16-2013 02:48 PM |
PDF reader with scroll bar | pj123 | Android Devices | 0 | 12-12-2011 12:07 PM |