![]() |
#31 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
|
Quote:
I have to say, I noticed this too (Windows 10), but I thought it might just be me or my machine. Or the fact I use a trackball. It is annoying, but like others, I figured out a workaround, so I didn't say anything, as so far, it has been my ONLY annoyance. |
|
![]() |
![]() |
![]() |
#32 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It's up to you if want to try try modifying the ContentTab. I'm certainly willing to give anything that you come up with a whirl, but I don't want to create a huge project for you either! |
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Yes, if I try to click on a non-current tab with any even slight horizontal velocity the drag process starts almost immediately. It is very touchy. This only seems to happen with non-current tabs. It does not bother me that much but I can unintentionally move a tab by accident.
Let me at least add the code to enable and disable drag and drop of individual tabs as it can not hurt to add it. I will take a shot at this tomorrow. It is too bad that ContentTabs do not know if they are the current tab or not, which would make this even easier. |
![]() |
![]() |
![]() |
#34 | |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
FWIW, I like the "click to enable a tab, click and drag to move the current enabled tab, can't move the inactive tabs" idea. |
|
![]() |
![]() |
![]() |
#35 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Well that approach doesn't work either as the ContentTab::dragEnterEvent event handler is NEVER invoked at all (as shown by qDebug() output).
So normally a QWidget can prevent itself from being able to be dragged and dropped but this mechanism seems to be overridden either in the QTabBar or QTabWidget code someplace. Since the dragEnterEvent event handler is never invoked we can not decide to either accept to ignore it. So we will need to figure out something else. By the way with the latest Qt 5.12.7 on macOS, the drag and drop of Tabs is much improved over the Qt 5.12.3 versions. It is not nearly as finicky anymore. So some platform specific changes must have made it into Qt since the Qt 5.12.3. KevinH |
![]() |
![]() |
![]() |
#37 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
>Move to #2 slot, then drag #1 down to #2 slot
I have a calendar software with the same problem (can't go to the top line OR the bottom line), and I work around it in the same way you suggest here. |
![]() |
![]() |
![]() |
#38 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Thanks for taking a shot anyway. The problem with the inactive tabs isn't really a deal-breaker anyway. It's more annoying than anything. We can always revisit it if an idea presents itself. I'll see what I can knock together for a startDragDistance tweak. One with a very narrow acceptable range of values. I'd consider an environment variable tweak, but that's just not very handy for most Windows users. And they're the ones who seem to need the tweak the most. I'll play with some options. Including simply setting a lower value for Windows. |
|
![]() |
![]() |
![]() |
#39 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
FYI, I checked the qtabbar.cpp code in qtbase and there really is no easy way to prevent inactive tabs from being dragged and dropped. The tab the mouse press event happens in is made the current tab but you will not see the change until the end. We would have to override the event handler in QTabBar and selectively ignore some mouse move events and in the end it may not help at all.
Btw the event->pos() used to determine if drag distance is enough will be measured in qt window standard pixels and not true resolution pixels, so it will return different values on Windows based on the highdpi settings and environment variables and may feel different on different displays in multi display systems. So you may want to use different minimum drag distances based on display resolution and highdpi settings for Windows. This is probably why this is much more stable on macOS as it always uses standard pixels versus device pixels for cursor positions. I could see changing the minimum drag distance setting to 25 from 50 just to see if it helps at all. |
![]() |
![]() |
![]() |
#40 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,572
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The Qt platform default value seems fine to me when not on a high dpi monitor. I may change the minimum based on the high dpi setting, or I may just leave it as the platform default and let users tweak upwards if necessary. I won't know until I see how things work on the high dpi monitor at home.
|
![]() |
![]() |
![]() |
#41 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
I don't know the internals of QT (thank goodness!!), so not sure if the idea is possible. But I was wondering if an alternative way of dealing with the problem is to have a slight time delay to register drag, rather than a minimum distance? Would that work?
So, don't start dragging unless the mouse down has been active for n milliseconds. |
![]() |
![]() |
![]() |
#42 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,764
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Unfortunately Qt uses drag distance and we can not change that without redesigning the qt internals. The problem with drag distance is that it can be different depending on screen resolution and seems to take into account acceleration. For example, flicking (clicking and dragging quite rapidly to the right or left in one motion and releasing) really causes Qt nightmares.
|
![]() |
![]() |
![]() |
#43 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Ugh. So much for that idea then. Why did QT get so popular again...? (I know, I know, it's the only real cross platform option available that isn't something like Electron)
|
![]() |
![]() |
![]() |
#44 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,728
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
But dragging items up and down the Book Browser is a bit of a PITA. Move Up/Down options in the context menu with user configured shortcuts would suit me better. BR |
![]() |
![]() |
![]() |
#45 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
They already have dedicated buttons for Move Up/Down, Promote/Demote. In 7.0, you'll also be able to Right-Click a heading (and I think Drag/Drop too). Word 2016 allows you to Drag/Drop (+ Promote/Demote in Right-Click) headings in their Navigation Pane. * * * I think another alternate method of moving files up/down in Sigil's Book Browser would be a nice enhancement. (Dedicated buttons would probably be hideously cluttered.) Last edited by Tex2002ans; 02-13-2020 at 08:31 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hacks Kindle browser to read html files | l1n1234 | Amazon Kindle | 23 | 01-28-2012 11:00 PM |
PRS-950 Can PRS-950 web browser view local HTML files? | roc | Sony Reader | 3 | 04-02-2011 10:58 AM |
Browser doesn't load local HTML files? | kenjennings | enTourage Archive | 1 | 02-19-2011 09:52 AM |
Difficulty with conversion of HTML | ficbot | Calibre | 8 | 03-23-2009 09:34 AM |