mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Project properties dialog launch a little more faster (especially on windows)
Instead of build machine_info class which take time, only to get the max width and height of screens, call of methods Machine_info::i_max_screen_width() and Machine_info::i_max_screen_height() are now static and compute only this. The project properties dialog is now faster because don't wait the end build of machine_info.
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
@param parent QWidget parent
|
||||
*/
|
||||
ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
|
||||
Machine_info *mymachineinfo= new Machine_info(this);
|
||||
//ScrollArea for low screens
|
||||
QScrollArea *scroll = new QScrollArea(this);
|
||||
scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||
@@ -36,7 +35,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
|
||||
// liste des pages
|
||||
pages_list = new QListWidget();
|
||||
pages_list -> setViewMode(QListView::IconMode);
|
||||
if(mymachineinfo->i_max_screen_height()<1000){
|
||||
if(Machine_info::i_max_screen_height()<1000){
|
||||
pages_list -> setIconSize(QSize(64, 64));
|
||||
} else {
|
||||
pages_list -> setIconSize(QSize(128, 128));
|
||||
@@ -80,8 +79,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) {
|
||||
connect(pages_list, SIGNAL(currentRowChanged(int)),
|
||||
pages_widget, SLOT(setCurrentIndex(int)));
|
||||
|
||||
setMaximumSize(mymachineinfo->i_max_screen_width(),
|
||||
mymachineinfo->i_max_screen_height());
|
||||
setMaximumSize(Machine_info::i_max_screen_width(), Machine_info::i_max_screen_height());
|
||||
resize(1400,1000);
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
|
||||
Reference in New Issue
Block a user