bugGNU Octave - Bugs: bug #49247, Backgroundcolor ignored for...

 
 

bug #49247: Backgroundcolor ignored for pushbutton and radiobutton

Submitted by:  None
Submitted on:  Sun 02 Oct 2016 12:27:10 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 4.0.3
Operating System: Microsoft Windows

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 Jump to the original submission)

Fri 14 Oct 2016 11:50:19 AM UTC, comment #19:

I think that position of controls is purely a toolkit (Qt vs ??) difference that we probably don't have much control over.

I see the same for slider color, and it looks like it ignores colors set via the palette - any examples I have seen of sucessfullt changing the slider colors has been through stylesheets.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Fri 14 Oct 2016 10:40:34 AM UTC, comment #18:

Thanks for looking into this. I also notice when resizing the window (with the mouse) that the black border sometimes becomes transparent...

I also wanted to add that the black borders can also be observed with uicontrol's slider:

it also makes me notice that the display of the slider differs fropm Matlab: In Matlab, you have < on the left and > on the right, while in Octave you have < on the left and <> on the right.

Guillaume <gyom>
Thu 13 Oct 2016 07:37:34 PM UTC, comment #17:

For the black box, I didn't see anything that could be set to remove it.

For the listbox, the frame can be changed to something like a Panel which does get rid of the line (Which looks like is a StyledPanel)

However the popupmenu and edit control both only have options to either display the frame or don't display it.

Without any frame, it doesn't match a standard control.

It might be able to be done using stylesheets.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 13 Oct 2016 10:27:46 AM UTC, comment #16:

Closing as fixed then

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 13 Oct 2016 09:31:45 AM UTC, comment #15:

The black borders on edit, listbox and popupmenu are reported in bug #44704 so maybe this bug report can be closed as "fixed" and conversation continued there. Thanks!

Guillaume <gyom>
Wed 12 Oct 2016 10:43:38 AM UTC, comment #14:

Hi, I'm very impressed about the activities initiated by my error report. Cause I'm using only OCTAVE as an end-user (no source) I cannot contribute in testing but it seems to me that a future release will solve this problem so I stay on happy.
Thanks to all !

L.Billmann <lbeducation>
Wed 12 Oct 2016 10:08:53 AM UTC, comment #13:

Ive noticed the borders on some of them as well - will look at that next

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 12 Oct 2016 09:46:10 AM UTC, comment #12:

Thanks again, John. All foreground and background colors seem to work fine, see attachment. I would actually be curious to see how it displays on your computer and whether you also have the black borders.

(file #38709)

Guillaume <gyom>
Wed 12 Oct 2016 01:21:50 AM UTC, comment #11:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/96411a33f570 for additional color changes

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 11 Oct 2016 05:04:08 PM UTC, comment #10:

You're right, I observe the same thing for popupmenu.

Guillaume <gyom>
Tue 11 Oct 2016 04:18:28 PM UTC, comment #9:

for popup menu, it looks like its the selected (non popup) part of the control that doesnt respect the color changes - inserting more items and popping it does use the colors.

I'll see if there is a way to make it use the colors when not 'popped' as well.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 11 Oct 2016 09:58:44 AM UTC, comment #8:

John, thanks! I can confirm that the backgroundcolors are now fine for pushbutton and radiobutton.

I also reran the script from bug #48255 to compare Octave and Matlab for all uicontrols:

and I can see four issues:

  • backgroundcolor of popupmenu
  • text color (ie foregroundcolor) of checkbox, popupmenu and radiobutton
  • checkbox and radiobutton default value
  • edit, listbox and popupmenu have a strange looking black border.

(file #38699, file #38700)

Guillaume <gyom>
Mon 10 Oct 2016 09:35:47 PM UTC, comment #7:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/95aff68c443d

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 10 Oct 2016 02:37:01 PM UTC, comment #6:

I'll recheck add those changes as well don't break the windows change and then push to stable

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 10 Oct 2016 02:28:36 PM UTC, comment #5:

Ok - I see that on fedora too - at a quick glance it looks like radiobutton (and checkbox) colors are not handled the same as pushbutton and togglebutton (when they should be)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 10 Oct 2016 12:10:27 PM UTC, comment #4:

I also observe the issue under Linux (Octave 4.3.0+ on openSUSE 13.2) with the radiobutton, but it's fine with the pushbutton.

(file #38693)

Guillaume <gyom>
Sun 09 Oct 2016 03:24:08 AM UTC, comment #3:

There is a lot of discusion on changing colors of pushbuttons on the Qt website when using Windows.

It appears that the standard setPalette option used in linux does not work depending on the application style.

Leaving two options to fix

1. embed the background color in the style for the button (which may not work, or may cause issues with other styles are also set)

2. set the application style to 'Windows' instead of WindowsXp or WindowsVista.

The attached patch does the second option.

(file #38689)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Sat 08 Oct 2016 06:45:06 PM UTC, comment #2:

Does the same thing in the octave 4.2rc2 under windows.

Works fine for me, in fedora.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 03 Oct 2016 02:10:32 PM UTC, comment #1:

See also bug #48255 and perhaps bug #44704.

Guillaume <gyom>
Sun 02 Oct 2016 12:27:10 PM UTC, original submission:

Specifying backgroundcolor for pushbutton or radiobutton is ignored and simply gray is used. For pushbutton it seems to be a small box around the button with the backgroundcolor but not the button itself. Simple program example and result from OCTAVE and MATLAB is found in the attachement.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38709:  all_uicontrols.png added by gyom (19KiB - image/png)
file #38699:  uicontrol_matlab.png added by gyom (12KiB - image/png)
file #38700:  uicontrol_octave.png added by gyom (19KiB - image/png)
file #38693:  backgroundcolor.png added by gyom (10KiB - image/png)
file #38689:  stylefix.patch added by lostbard (1KiB - text/x-patch)
file #38641:  test_gui_backgroundcolor.m added by None (486B - text/plain)
file #38642:  result_OCTAVE.png added by None (11KiB - image/png)
file #38643:  result_MATLAB.png added by None (16KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lbeducation (Posted a comment)
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by gyom (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 13 Oct 2016 10:27:46 AM UTClostbardStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 12 Oct 2016 09:46:10 AM UTCgyomAttached File-=>Added all_uicontrols.png, #38709
    Tue 11 Oct 2016 09:58:44 AM UTCgyomAttached File-=>Added uicontrol_matlab.png, #38699
      Attached File-=>Added uicontrol_octave.png, #38700
    Mon 10 Oct 2016 09:35:47 PM UTClostbardStatusPatch Submitted=>Ready For Test
    Mon 10 Oct 2016 12:10:27 PM UTCgyomAttached File-=>Added backgroundcolor.png, #38693
    Sun 09 Oct 2016 03:24:08 AM UTClostbardAttached File-=>Added stylefix.patch, #38689
      StatusNone=>Patch Submitted
      Assigned toNone=>lostbard
    Sun 02 Oct 2016 12:27:10 PM UTCNoneAttached File-=>Added test_gui_backgroundcolor.m, #38641
      Attached File-=>Added result_OCTAVE.png, #38642
      Attached File-=>Added result_MATLAB.png, #38643

    Back to the top


    Powered by Savane 3.1-cleanup1