Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Width of Tree pane is set by length of Label field #120

Closed
johnblommers opened this issue Nov 3, 2019 · 5 comments
Closed

Width of Tree pane is set by length of Label field #120

johnblommers opened this issue Nov 3, 2019 · 5 comments
Assignees
Labels
bug Issue: Something isn't working user interface Component: General user interface

Comments

@johnblommers
Copy link

Some of my document titles are 50 characters long. They're long because they include a synopsis. When I double click on a document name with a wide title the tree pane abruptly widens. The editor and document panes are compressed into the remaining space.

It's quite a jarring and unexpected behavior.

Consider allowing the Label field below the tree view to wrap or to display ellipses in place of characters for which no room remains to display. See the attached screenshot:

Screenshot from 2019-11-03 12-24-26

@vkbo
Copy link
Owner

vkbo commented Nov 3, 2019

That is strange. The Qt widget itself should behave like you request, and it does on my computer. the label field shows with an ellipsis and never automatically resizes. I'm not sure what causes this. Can you check in the About Qt box to see which version of Qt you have?

Alternatively, if you run novelWriter with the -d flag, it should print the version of Qt and PyQt.

@vkbo
Copy link
Owner

vkbo commented Nov 3, 2019

Ah, wait, you mean the bottom panel below the tree view, not the label in the tree itself. That should be an easy fix.

@vkbo vkbo self-assigned this Nov 3, 2019
@vkbo vkbo added bug Issue: Something isn't working user interface Component: General user interface labels Nov 3, 2019
@johnblommers
Copy link
Author

johnblommers commented Nov 3, 2019

Yes, the bottom panel below the tree view where it reads Label. That field forces the tree view pane to become very wide. I can only imagine what might happen if the user used a few hundred characters for a document name ;-) But you asked for the debug output so here it is anyway:

                     nw.config:201   DEBUG     Loading config file
                     nw.config:195   DEBUG     Using spell check tool 'enchant'
                nw.gui.winmain:58    INFO      Starting novelWriter
                nw.gui.winmain:59    DEBUG     Initialising GUI ...
                      nw.theme:134   DEBUG     Loading theme files
                      nw.theme:200   INFO      Loaded theme 'default'
                      nw.theme:240   INFO      Loaded syntax theme 'light_owl'
                nw.gui.winmain:66    INFO      OS:             linux
                nw.gui.winmain:67    INFO      Qt5 Version:    5.12.4 (51204)
                nw.gui.winmain:68    INFO      PyQt5 Version:  5.12.3 (51203)
                nw.gui.winmain:69    INFO      Python Version: 3.7.5rc1 (0x30705c1)
              nw.gui.statusbar:28    DEBUG     Initialising MainStatus ...
              nw.gui.statusbar:83    DEBUG     MainStatus initialisation complete
     nw.gui.elements.noticebar:27    DEBUG     Initialising NoticeBar ...
     nw.gui.elements.noticebar:51    DEBUG     NoticeBar initialisation complete
     nw.gui.elements.doceditor:38    DEBUG     Initialising DocEditor ...
         nw.tools.spellenchant:31    DEBUG     Enchant spell checking activated
     nw.gui.tools.dochighlight:28    DEBUG     Initialising DocHighlighter ...
     nw.gui.tools.dochighlight:62    DEBUG     Setting up highlighting rules
     nw.gui.tools.dochighlight:56    DEBUG     DocHighlighter initialisation complete
         nw.tools.spellenchant:43    DEBUG     Enchant spell checking for language en_US loaded
     nw.gui.tools.dochighlight:62    DEBUG     Setting up highlighting rules
     nw.gui.elements.doceditor:100   DEBUG     DocEditor initialisation complete
     nw.gui.elements.docviewer:31    DEBUG     Initialising DocViewer ...
     nw.gui.elements.docviewer:52    DEBUG     DocViewer initialisation complete
   nw.gui.elements.viewdetails:32    DEBUG     Initialising DocViewDetails ...
   nw.gui.elements.viewdetails:82    DEBUG     DocViewDetails initialisation complete
     nw.gui.elements.searchbar:29    DEBUG     Initialising SearchBar ...
     nw.gui.elements.searchbar:76    DEBUG     SearchBar initialisation complete
    nw.gui.elements.docdetails:33    DEBUG     Initialising DocDetails ...
    nw.gui.elements.docdetails:67    DEBUG     DocDetails initialisation complete
       nw.gui.elements.doctree:36    DEBUG     Initialising DocTree ...
       nw.gui.elements.doctree:80    DEBUG     DocTree initialisation complete
               nw.gui.mainmenu:29    DEBUG     Initialising Main Menu ...
               nw.gui.mainmenu:47    DEBUG     Main Menu initialisation complete
                nw.gui.winmain:175   DEBUG     GUI initialisation complete

And the rest of my system versioning:

neofetch
             /////////////                johnb@blacknight 
         /////////////////////            ---------------- 
      ///////*767////////////////         OS: Pop!_OS 19.10 x86_64 
    //////7676767676*//////////////       Host: Thelio Major thelio-major-r1 
   /////76767//7676767//////////////      Kernel: 5.3.0-20-generic 
  /////767676///*76767///////////////     Uptime: 4 days, 19 hours, 56 mins 
 ///////767676///76767.///7676*///////    Packages: 4015 (dpkg), 7 (flatpak), 6 
/////////767676//76767///767676////////   Shell: bash 5.0.3 
//////////76767676767////76767/////////   Resolution: 1920x1080 
///////////76767676//////7676//////////   DE: GNOME 3.34.1 
////////////,7676,///////767///////////   WM: GNOME Shell 
/////////////*7676///////76////////////   WM Theme: Pop 
///////////////7676////////////////////   Theme: Pop-dark [GTK2/3] 
 ///////////////7676///767////////////    Icons: Pop [GTK2/3] 
  //////////////////////'////////////     Terminal: gnome-terminal 
   //////.7676767676767676767,//////      CPU: AMD Ryzen Threadripper 2990WX 32 
    /////767676767676767676767/////       GPU: NVIDIA GeForce RTX 2080 Rev. A 
      ///////////////////////////         Memory: 10041MiB / 128861MiB 
         /////////////////////
             /////////////                                        

@vkbo
Copy link
Owner

vkbo commented Nov 3, 2019

Yeah, I was just concerned at first that older version had a different behaviour for the double click on the tree, or a different default setting. It has an auto-expand feature on double click, but that's vertical expansion.

Anyhow, the fix was straight forward. Just let the label field word wrap when it runs out of space. just to be on the safe side, If the label is longer than 100 characters, it is also truncated.

You're running on a version of Qt that has all the features novelWriter uses, so that's all good. I had to add version checking on a couple of things.

@vkbo
Copy link
Owner

vkbo commented Nov 3, 2019

Fixed with PR #122.

@vkbo vkbo closed this as completed Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue: Something isn't working user interface Component: General user interface
Projects
None yet
Development

No branches or pull requests

2 participants