Mercurial > octave
changeset 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 | ad9252d7472b |
children | 822dc79a7e97 298977286479 |
files | libgui/graphics/PushButtonControl.cc libgui/graphics/ToggleButtonControl.cc |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/PushButtonControl.cc Wed Apr 15 17:23:51 2020 -0400 +++ b/libgui/graphics/PushButtonControl.cc Thu Apr 16 11:48:06 2020 -0700 @@ -69,7 +69,7 @@ btn->setAutoFillBackground (true); octave_value cdat = up.get_cdata (); QImage img = Utils::makeImageFromCData (cdat, - cdat.rows (), cdat.columns ()); + cdat.columns (), cdat.rows ()); btn->setIcon (QIcon (QPixmap::fromImage (img))); }
--- a/libgui/graphics/ToggleButtonControl.cc Wed Apr 15 17:23:51 2020 -0400 +++ b/libgui/graphics/ToggleButtonControl.cc Thu Apr 16 11:48:06 2020 -0700 @@ -75,7 +75,7 @@ btn->setAutoFillBackground (true); octave_value cdat = up.get_cdata (); QImage img = Utils::makeImageFromCData (cdat, - cdat.rows (), cdat.columns ()); + cdat.columns (), cdat.rows ()); btn->setIcon (QIcon (QPixmap::fromImage (img))); }