[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrec
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized |
Date: |
Thu, 16 Apr 2020 14:05:13 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #4, bug #58144 (project octave):
The issue is in libgui/graphics/PushButtonControl.cc at line 61. The function
is
PushButtonControl::PushButtonControl (octave::base_qobject& oct_qobj,
octave::interpreter& interp,
const graphics_object& go,
QPushButton *btn)
: ButtonControl (oct_qobj, interp, go, btn)
{
uicontrol::properties& up = properties<uicontrol> ();
btn->setAutoFillBackground (true);
octave_value cdat = up.get_cdata ();
QImage img = Utils::makeImageFromCData (cdat,
cdat.rows (), cdat.columns ());
btn->setIcon (QIcon (QPixmap::fromImage (img)));
}
I modified the code to print out the width and height of the QImage which is
correct. I then checked the size of the QPixmap, and it too is correct. The
issues seems to be with QIcon. The window manager uses the style that you
have selected for buttons, and applies it to the QIcon when the setIcon()
function is called. For normal systems, this means the size is something
small like 16x16 or 22x22 pixels.
I'm not a Qt programmer, but the resolution to the problem will be found by
changing something related to the QIcon class in Qt.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58144>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #58144] Cdata for UIcontrol is not properly implemented, Rik, 2020/04/09
- Message not available
- Message not available
- [Octave-bug-tracker] [bug #58144] Cdata for UIcontrol is not properly implemented, Rik, 2020/04/14
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/14
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized,
Rik <=
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/16
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Guillaume, 2020/04/16
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/16
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/16
- Message not available
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/18
- Message not available
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/18
- Message not available
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/20
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Guillaume, 2020/04/21
- [Octave-bug-tracker] [bug #58144] "Cdata" icon for UIcontrol is incorrectly sized, Rik, 2020/04/21