2022-11-09 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the 'Edit Image' dialog in rdadmin(1) that could
	cause the image display to be incorrectly scaled/positioned.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2022-11-09 13:22:41 -05:00
parent 3227e340c1
commit 5792fe4e66
2 changed files with 6 additions and 2 deletions

View File

@ -23638,3 +23638,6 @@
2022-11-09 Fred Gleason <fredg@paravelsystems.com>
* Added an image format check to rddbmgr(8) to prevent it from
attempting to generate thumbnail images from non-JPEG/PNG images.
2022-11-09 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'Edit Image' dialog in rdadmin(1) that could
cause the image display to be incorrectly scaled/positioned.

View File

@ -2,7 +2,7 @@
//
// View a pixmap image and modify its metadata
//
// (C) Copyright 2020-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2020-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -35,6 +35,7 @@ EditImage::EditImage(QWidget *parent)
setMinimumHeight(150);
c_image_label=new QLabel(this);
c_image_label->setScaledContents(true);
c_description_label=new QLabel(tr("Description")+":",this);
c_description_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
@ -167,7 +168,7 @@ void EditImage::resizeEvent(QResizeEvent *e)
int h=size().height();
c_image_label->
setGeometry(10,2,w-EDIT_IMAGE_WIDTH_OFFSET,h-EDIT_IMAGE_HEIGHT_OFFSET);
setGeometry(10,2,w-EDIT_IMAGE_WIDTH_OFFSET,h-EDIT_IMAGE_HEIGHT_OFFSET-20);
c_image_label->setPixmap(QPixmap::fromImage(c_image.
scaled(c_image_label->size(),Qt::KeepAspectRatio)));