Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-15-2024, 02:31 PM   #76
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I can't see anything obvious that would break it, but I'm unable to compile in some debug output where I am to test things out.

I didn't change any ifdefs in my patch because they were a bit twisty. I DID comment a few things out that would leave the ifdefs sections empty of any code, but I added an empty ; that I was under the impression would work similar to "pass" in Python.

Last edited by DiapDealer; 04-15-2024 at 02:34 PM.
DiapDealer is offline   Reply With Quote
Old 04-15-2024, 05:28 PM   #77
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
It must be something else that is causing the issue. I went through the ifdef spaghetti in main.cpp and added #endif comments to help pair them with their ifdef starts and they all matched as far as I could tell.

Evey pushed that to master in case it might help track things down.

Very Strange!
KevinH is offline   Reply With Quote
Advert
Old 04-15-2024, 06:21 PM   #78
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I think I got it working. But Code View and and Preview are not highlighting for me. I think that's normal for the original qt_styles.qss technique though, right? You had to add some code to get Code View and Preview working didn't you? Or are they supposed to work using the original qt_styles.qss technique now, too?

I just had to flat-out remove the ifdefs pertaining to Windows Darkmode to get stuff working. Apparently no amount of placeholder shenanigans was going to work.

There's no reason we can't indent those ifdefs to make things easier to match up is there?
DiapDealer is offline   Reply With Quote
Old 04-15-2024, 07:11 PM   #79
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
Indents should work but some old compilers wanted the # as the first char of the line but that was a long time ago.

Yes, the :focus qss qt_styles won't work on Preview and CodeView. Both use additional code that checks the focus highlight setting to enable the focus highlight to work on them.
KevinH is offline   Reply With Quote
Old 04-15-2024, 08:25 PM   #80
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
Yes, the :focus qss qt_styles won't work on Preview and CodeView. Both use additional code that checks the focus highlight setting to enable the focus highlight to work on them.
Ok. That makes me feel better. So we don't have to choose between using the Qt6.5+ dark theme on Windows and user-defined qss style customization. That would have been a deal-breaker. Thanks.
DiapDealer is offline   Reply With Quote
Advert
Old 04-16-2024, 10:37 AM   #81
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
I have now spent two days playing around with Tab to change focus using setTabOrder and found out a few things:

1. Anything in a QToolBar that does not have a menu pulldown will not get tab focus.

2. Any QToolButtons in a QDockWidget will not get focus via a tab either.
Note: FindReplace is a build in child widget of QMainWindow not a QDockWidget

None of this is documented anyplace I could find anyplace online. Just a bunch of unanswered queries about how to to use Tab focus in a QToolBar and inside a QDockWidget.

3. It would NOT be easy to prevent tab shift focus to QDockWidgets by setting use setFocusPolicy(Qt::ClickFocus). I even tried setFocusPolicy(Qt::NoFocus). They stay a part of the tab focus chain no matter what I do. I would have to overload and reimplement focusNextPreviousChild(bool next) in MainWindow and return false anytime a next in the focus chain is a QDockWidget and make double sure they appear at the end of setTabOrder. Not sure this is worth the work.

4. But I can use that approach to prevent the QToolBar QToolButtons that have pull down menus (Headings, Automate1, Automate2, Automate3, etc) from being part of the tab focus chain.

(ASIDE, RANT)
And today I learned that Qt dev guys really do not give a rat's ass about the quality of their product. They only fix the issue with the test case itself but not the underlying issue. And they refuse to look at even related sub-issues without a separate bug report and separate test case, even when a one line change in the current provided test case would show the problem!

In other words, some manager idiot decided that the number of bug issues closed (not necessarily fixed in any way) is the performance metric instead of the quality of the underlying product. That means if a Qt dev can close an issue for any reason (valid or invalid) they will do so. So sad. In the early 1980's bug reports from user's (along with sample code) were treated like gold. Not so today.

It also illustrates the problem with using easily measurable but incomplete performance metrics like number of issues closed. It is a strong incentive but in truth it is not always aligned with quality.
(/ASIDE, RANT)

Last edited by KevinH; 04-16-2024 at 11:37 AM.
KevinH is offline   Reply With Quote
Old 04-16-2024, 03:11 PM   #82
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
Update: It seems that you actually can use tab to shift focus on buttons inside a QDockWidget by using setTabOrder.

The issue is that if the QDockWidget has a QtWebEngine as part of the setTabOrder (like our Preview does) the tab order is broken by the QtWebEngine as it literally creates its own render widget as its focus proxy widget (a QQuickWidget) on fly and it can recreate it as needed to handle rendering.

This changes the focus chain on the fly breaking any previously setTabOrder.

So getting the Preview's own toolbar buttons to handle tab shifting focus would be a real bear probably either requiring moving it to the top of the QDockWidget and/or making sure all buttons are created first before the QtWebEngineWidget.

Not something for a minor point update release anyway.

Wow this tab shift to move focus is not easy to change or control because of lots of special cases and corner cases. Especially involving QtWebEngine.

Last edited by KevinH; 04-16-2024 at 03:14 PM.
KevinH is offline   Reply With Quote
Old 04-16-2024, 05:05 PM   #83
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
I agree if we just want to move the Tweak Drag Distance to an environment variable, that will free up space for the Double Cursor Width setting with no extra changes.
So just be clear: this eliminates the need for new Accessibility tab , or no?

Quote:
Originally Posted by KevinH View Post
@DiapDealer, if you agree, and get a free moment would you move the tweak drag distance to an environment variable and add the double width cursor (and SettingsStore stuff)?
Will do.
DiapDealer is offline   Reply With Quote
Old 04-16-2024, 05:09 PM   #84
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, I am not planning to add any more preferences, so your idea of moving the drag distance to an environment var makes good sense, while freeing up space for the double width text cursor prefs.
KevinH is offline   Reply With Quote
Old 04-16-2024, 05:26 PM   #85
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,577
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Thanks. I'm on it.
DiapDealer is offline   Reply With Quote
Old 04-16-2024, 07:13 PM   #86
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,632
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
I have now spent two days playing around with Tab to change focus using setTabOrder and found out a few things:

. . .


Should I assume nothing sensible can be done about tabbing between 'widgets' without significant effort?

Circling back to my the original issue - visibility of which child window has focus. If the coloured border solution can't be readily applied to the Codeview and Preview windows, how about changing the colour of the dockable child title bar.

On Windows, if a dockable child is undocked, then its title bar will have the "Accent" colour when it has focus - i.e the border is redundant. So, why not do the same when its docked. When Codeview has focus the tag on the current tab-panel item could use the same colour. viz:

Click image for larger version

Name:	Screenshot 2024-04-17 083845.jpg
Views:	28
Size:	209.6 KB
ID:	207657

Maybe the F&R non-dockable child window could be given a title bar too, then its 'X' could be put where it belongs, at the far right - rather than the loony left :-)

Curious - why isn't the F&R child window dockable?

BR

Last edited by BetterRed; 04-16-2024 at 07:16 PM.
BetterRed is offline   Reply With Quote
Old 04-16-2024, 07:18 PM   #87
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
Just posted a fix to master for some of the stranger tab to shift focus issues:

- made it less likely CodeView will get hit by a tab to shift focus sequence

- removed the automate, case, and headings toolbar tools from the tab to shift focus path
to match all the other toolbars

- completely reworked Preview to add its tool buttons to the tab focus chain since there were no menus to launch any of them

- modified the FindReplace tabstop sequence to better follow the visual/logical path through FindReplace (ie now top to bottom)

I have not tried stopping a tab from moving to the QDockWidgets and I am not sure it is worth the effort to try to change (and that would require a new preference setting).
We can leave it as something for the future.
KevinH is offline   Reply With Quote
Old 04-16-2024, 07:28 PM   #88
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,683
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, tabbing between dockwidgets will continue until some future release.

The focus highlight border can now be applied to both CodeView and Preview and it works.

Redrawing title bars requires overloading the paintEvent in each widget and replacing it with our own. No need now that the border works.

Find and Replace is not a QDockwidget. It is a child window of our MainWindow that is shown and hidden. Its position is locked and it can not be undocked. That means it has no titlebar. As for where the X close is. It is manually added and has been in the same place forever, and is not moving given the 10 years of muscle memory I have built up. You'll have to just live with it.

It was designed as part of the main window (just like TabManager and CodeView) so that it can be integrated visually and codewise with them. Again, a decision we will not be revisiting as it makes good sense.


Quote:
Originally Posted by BetterRed View Post


Should I assume nothing sensible can be done about tabbing between 'widgets' without significant effort?

Circling back to my the original issue - visibility of which child window has focus. If the coloured border solution can't be readily applied to the Codeview and Preview windows, how about changing the colour of the dockable child title bar.

On Windows, if a dockable child is undocked, then its title bar will have the "Accent" colour when it has focus - i.e the border is redundant. So, why not do the same when its docked. When Codeview has focus the tag on the current tab-panel item could use the same colour. viz:

Attachment 207657

Maybe the F&R non-dockable child window could be given a title bar too, then its 'X' could be put where it belongs, at the far right - rather than the loony left :-)

Curious - why isn't the F&R child window dockable?

BR
KevinH is offline   Reply With Quote
Old 04-16-2024, 07:33 PM   #89
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,632
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
Just posted a fix to master for some of the stranger tab to shift focus issues:

. . .
- thanks

BR
BetterRed is offline   Reply With Quote
Old 04-16-2024, 07:57 PM   #90
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,632
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@BekkyEbook

You posted the following screen shot here

Click image for larger version

Name:	sigil-dark-theme-qt6.png
Views:	50
Size:	89.5 KB
ID:	207658

I'm puzzled as to how you docked the Validation and ToC windows where you did - above Codeview and alongside Preview. I've attached some screen shots of my failed attempts.

BR
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-04-16 081144.jpg
Views:	24
Size:	118.1 KB
ID:	207659   Click image for larger version

Name:	Screenshot 2024-04-16 081734.jpg
Views:	27
Size:	109.4 KB
ID:	207660  
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Icon Redesign for future 1.0 Release of Sigil shorshe Sigil 38 06-06-2016 11:29 PM
Kindle Software Preview Release and calibre 'Fetch News' items tomsem Devices 25 07-20-2011 08:02 AM
Will amazon release another cheaper version of DX in the near future CalvinL Amazon Kindle 6 07-31-2010 05:01 PM
Suggestion For Future Release Of Calibre clambert Calibre 5 07-10-2010 01:45 PM
dotReader alpha release next month with future iLiad support possible Alexander Turcic News 7 09-28-2006 12:24 PM


All times are GMT -4. The time now is 10:47 AM.


MobileRead.com is a privately owned, operated and funded community.