Mercurial > octave
comparison libgui/graphics/ToggleButtonControl.cc @ 28225:fbced93c9704 stable
Fix reversal of width and height in uicontrol icon creation (bug #58144).
* PushButtonControl.cc (PushButtonControl::PushButtonControl): Reverse order of
parameters in call to Utils::makeImageFromCData which expects order to be
width, height.
* ToggleButtonControl.cc (ToggleButtonControl::ToggleButtonControl): Reverse
order of parameters in call to Utils::makeImageFromCData which expects order to
be width, height.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 16 Apr 2020 11:48:06 -0700 |
parents | bd51beb6205e |
children | a56ee7986ea4 0a5b15007766 |
comparison
equal
deleted
inserted
replaced
28224:ad9252d7472b | 28225:fbced93c9704 |
---|---|
73 | 73 |
74 btn->setCheckable (true); | 74 btn->setCheckable (true); |
75 btn->setAutoFillBackground (true); | 75 btn->setAutoFillBackground (true); |
76 octave_value cdat = up.get_cdata (); | 76 octave_value cdat = up.get_cdata (); |
77 QImage img = Utils::makeImageFromCData (cdat, | 77 QImage img = Utils::makeImageFromCData (cdat, |
78 cdat.rows (), cdat.columns ()); | 78 cdat.columns (), cdat.rows ()); |
79 btn->setIcon (QIcon (QPixmap::fromImage (img))); | 79 btn->setIcon (QIcon (QPixmap::fromImage (img))); |
80 } | 80 } |
81 | 81 |
82 ToggleButtonControl::~ToggleButtonControl (void) | 82 ToggleButtonControl::~ToggleButtonControl (void) |
83 { } | 83 { } |