Mercurial > octave
comparison libgui/graphics/PushButtonControl.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 |
---|---|
67 uicontrol::properties& up = properties<uicontrol> (); | 67 uicontrol::properties& up = properties<uicontrol> (); |
68 | 68 |
69 btn->setAutoFillBackground (true); | 69 btn->setAutoFillBackground (true); |
70 octave_value cdat = up.get_cdata (); | 70 octave_value cdat = up.get_cdata (); |
71 QImage img = Utils::makeImageFromCData (cdat, | 71 QImage img = Utils::makeImageFromCData (cdat, |
72 cdat.rows (), cdat.columns ()); | 72 cdat.columns (), cdat.rows ()); |
73 btn->setIcon (QIcon (QPixmap::fromImage (img))); | 73 btn->setIcon (QIcon (QPixmap::fromImage (img))); |
74 } | 74 } |
75 | 75 |
76 PushButtonControl::~PushButtonControl (void) | 76 PushButtonControl::~PushButtonControl (void) |
77 { } | 77 { } |