bugGNU Octave - Bugs: bug #55899, "macintos" style in...

 
 

bug #55899: "macintos" style in Preferences > General

Submitted by:  Andrew Janke <apjanke>
Submitted on:  Wed 13 Mar 2019 03:20:12 AM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  5.1.0 Operating System:  Mac OS

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Thu 14 Mar 2019 09:10:09 AM UTC, comment #7: 

I've built against the current default, and it looks good. Thank you!

Andrew Janke <apjanke>
Wed 13 Mar 2019 09:15:22 PM UTC, comment #6: 
Torsten Lilge <ttl>
Project Member
Wed 13 Mar 2019 09:13:14 PM UTC, comment #5: 

You're welcome!

Andrew Janke <apjanke>
Wed 13 Mar 2019 09:09:34 PM UTC, comment #4: 

I have just tested the patch and with the added minimum size, the width is automatically expanding, even for very long strings inserted into the combo box. The same effect could be acheived by setting "preferred" to "minimum" in the size policy.

I am going to push the patch and close the report.

Andrew, thanks for the patch.

Torsten Lilge <ttl>
Project Member
Wed 13 Mar 2019 08:52:19 PM UTC, comment #3: 

> In terms of writing less brittle code, is there a way to indicate to Qt to size the dropdown based on the contents? That would change naturally as the strings themselves change.


I think that's already in effect: there's a "preferred size" that I think is based on the text contents. I think that's why the Language dropdown was rendering as wider than the Styles dropdown, even though they had the same preferred size and appeared the same width in the designer view. I don't know why the Styles dropdown wasn't expanding enough to accomodate "macintosh".

Or maybe the Preferred Size is based on the original dummy contents in the designer view, and not the dynamically-populated contents added at run time: maybe these widgets don't resize at run time in reponse to added or removed items.

> What happens if you leave off specifying a size entirely (well, a minimum size is okay)? Does Qt do auto-sizing then?


I don't know. I did this in the Qt Designer GUI, only adjusting the Minimum sizes of the dropdowns, and this was the result. Note that the fixed sizes (as opposed to minimum sizes) are only on generic "areaWidgetContents" widgets.

I'll manually try removing the sizes entirely and rebuild and see what happens.

When other developers have been editing this file, are they hacking on it directly in a text editor, or using Qt Designer to manipulate it?

Andrew Janke <apjanke>
Wed 13 Mar 2019 08:44:53 PM UTC, comment #2: 

One of the GUI experts will have to weigh in on this.

In terms of writing less brittle code, is there a way to indicate to Qt to size the dropdown based on the contents?  That would change naturally as the strings themselves change.

What happens if you leave off specifying a size entirely (well, a minimum size is okay)?  Does Qt do auto-sizing then?

Rik <rik5>
Project Administrator
Wed 13 Mar 2019 03:40:59 PM UTC, comment #1: 

Here's a patch to fix it: file #46518:  adjust-style-dropdown-width.diff

This adjusts the layout of the Settings dialog so the dropdown for Styles is wide enough to accomodate "macintosh". Also adjusts the width for the Language dropdown above it to be the same minimum width, for aesthetics.

The name "macintosh" comes from the QTStyleFactory list of styles, so it's nontrivial to change the capitalization, so I just left that alone.

Andrew Janke <apjanke>
Wed 13 Mar 2019 03:20:12 AM UTC, original submission:  

Minor cosmetic issue:

The "Style" dropdown in Preferences has an entry for "macintos" in the pop-up for the dropdown. It's missing an "h" and it should be capitalized, or maybe just "Mac".

If I actually select "macintos", it becomes displayed as "macintosh" in the dropdown menu. So I'm guessing the underlying text is correct, and it's just getting cut off because the Style dropdown is too narrow.

This is on a 5K iMac with retina display. macOS 10.14.3 Mojave.

Andrew Janke <apjanke>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46518:  adjust-style-dropdown-width.diff added by apjanke (8KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by apjanke (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-13 ttl StatusNone => Fixed
        Open/ClosedOpen => Closed
    2019-03-13 apjanke Attached File- => Added adjust-style-dropdown-width.diff, #46518
    2019-03-13 apjanke Attached File- => Added Screen Shot 2019-03-12 at 11.15.30 PM.png, #46511

    Back to the top


    Powered by Savane 3.5