Added resize event to about dialog, some minor layout fixes

master
Thomas Hooge 7 years ago
parent 1b33dde879
commit d30b9c4bb9
  1. 12
      src/dialogs/AboutDlg.cpp
  2. 1
      src/dialogs/AboutDlg.h

@ -55,11 +55,12 @@ AboutDialog::AboutDialog(QWidget* parent):QDialog(parent)
str+="</div><br><div style='margin-left:0px;'>"; str+="</div><br><div style='margin-left:0px;'>";
str+="<b>"+tr("Thanks To")+"</b><br>"; str+="<b>"+tr("Thanks To")+"</b><br>";
str+="</div><div style='margin-left:10px;'>"; str+="</div><div style='margin-left:10px;'>";
str+="<u>Matthias Miller</u><br>"+tr("Patches for better MacOS X support")+"<br>www.outofhanwell.com<br></div>"; str+="<u>Matthias Miller</u><br>"+tr("Patches for better MacOS X support")+"<br>www.outofhanwell.com<br>";
str+="<br>"; str+="<br>";
str+="<u>James Nicholls</u><br>"+tr("Main Application Icon")/*+"<br>"+tr("mailto:???")*/+"<br></div>"; str+="<u>James Nicholls</u><br>"+tr("Main Application Icon")/*+"<br>"+tr("mailto:???")*/+"<br>";
str+="<br>"; str+="<br>";
str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>dinosaur-rus@users.sourceforge.net<br></div>"; str+="<u>Constantin Makshin</u><br>"+tr("Various fixes and improvements")+"<br>dinosaur-rus@users.sourceforge.net<br>";
str+="</div>";
Edit_Thanks->setHtml(str); Edit_Thanks->setHtml(str);
QFile gpl(DataDir+"/license.html"); QFile gpl(DataDir+"/license.html");
@ -80,3 +81,8 @@ void AboutDialog::paintEvent(QPaintEvent *event){
painter.setClipRegion(event->region()); painter.setClipRegion(event->region());
painter.drawPixmap(QPoint(0,0),BannerPixmap); painter.drawPixmap(QPoint(0,0),BannerPixmap);
} }
void AboutDialog::resizeEvent(QResizeEvent* event){
createBanner(&BannerPixmap, getPixmap("keepassx"), QString("%1 %2").arg(APP_DISPLAY_NAME, APP_VERSION), width());
QDialog::resizeEvent(event);
}

@ -32,6 +32,7 @@ class AboutDialog : public QDialog, private Ui_AboutDlg
private: private:
QPixmap BannerPixmap; QPixmap BannerPixmap;
virtual void paintEvent(QPaintEvent*); virtual void paintEvent(QPaintEvent*);
virtual void resizeEvent(QResizeEvent*);
}; };
#endif #endif