Skip to content

Commit

Permalink
remove useless stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kambala-decapitator committed Feb 19, 2024
1 parent e2fa1b7 commit d0d6868
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
29 changes: 4 additions & 25 deletions creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,9 @@ Creator::Creator(Privileges &privilegesArg, QWidget *parent) :
privileges(privilegesArg),
deviceEjected("")
{
// dummy strings used for translation buttons on message box
QString forMsgBoxTranslationStrings = tr("Yes") + \
tr("No") + \
tr("OK");
Q_UNUSED(forMsgBoxTranslationStrings);

timerId = 0;
restoreGeometry(settings.value("window/geometry").toByteArray());

ui->setupUi(this);
installEventFilter(this);

#if defined(Q_OS_WIN)
diskWriter = new DiskWriter_windows();
Expand Down Expand Up @@ -160,35 +152,22 @@ Creator::Creator(Privileges &privilegesArg, QWidget *parent) :

// create a timer that refreshes the device list every 1.5 second
// if there is any change then list is changed and current device removed
timerId = 0;
timerId = startTimer(timerValue);

// set Fusion style
QApplication::setStyle(QStyleFactory::create("Fusion"));
// and apply some changes to styles

#ifndef Q_OS_MAC
#ifdef Q_OS_MACOS
QFile fileStyle(":/qss/stylesheet_osx.qss");
#else
QFile fileStyle(":/qss/stylesheet.qss");
#endif
if (fileStyle.open(QIODevice::ReadOnly | QIODevice::Text)) {
this->setStyleSheet(QLatin1String(fileStyle.readAll()));
this->ensurePolished();
fileStyle.close();
}
#else
QFile fileStyleOsx(":/qss/stylesheet_osx.qss");
if (fileStyleOsx.open(QIODevice::ReadOnly | QIODevice::Text)) {
this->setStyleSheet(QLatin1String(fileStyleOsx.readAll()));
this->ensurePolished();
fileStyleOsx.close();
}

QFont aboutFont;
aboutFont.setPointSize(13);
ui->labelAbout->setFont(aboutFont);

ui->closeAboutButton->setAttribute(Qt::WA_MacSmallSize);
ui->labelVersion->setAttribute(Qt::WA_MacSmallSize);
#endif

setImageFileName("");
ui->writeFlashButton->setEnabled(false);
Expand Down
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ int main(int argc, char *argv[])

#ifndef Q_OS_MACOS
privileges.SetUser();
#endif
privileges.Whoami();
#endif

Creator win(privileges, 0);
win.setArgFile(argFile);
Expand Down
1 change: 0 additions & 1 deletion stylesheet_osx.qss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ QLineEdit {
/* from http://stackoverflow.com/questions/29939990/qcombobox-style-for-choosed-item-in-drop-down-list
OS X fix https://github.com/xPoke/MetroMumble/blob/master/OSX/OSX%20Dark.qss */
QComboBox {
font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
font-size: 11pt;
margin: 0;
padding: 4px;
Expand Down

0 comments on commit d0d6868

Please sign in to comment.