[fonts] set to pt instead of px to work better with hdpi screens

This commit is contained in:
Jan Grewe 2021-03-02 17:05:01 +01:00
parent a87070e43f
commit f1bbf54244
3 changed files with 18 additions and 19 deletions

View File

@ -11,7 +11,6 @@ int main(int argc, char *argv[])
QGuiApplication::setOrganizationDomain("neuroetho.uni-tuebingen.de"); QGuiApplication::setOrganizationDomain("neuroetho.uni-tuebingen.de");
QGuiApplication::setApplicationName("PylonRecorder"); QGuiApplication::setApplicationName("PylonRecorder");
QGuiApplication::setApplicationVersion("0.1.0"); QGuiApplication::setApplicationVersion("0.1.0");
QCommandLineParser commandLineParser; QCommandLineParser commandLineParser;
commandLineParser.addHelpOption(); commandLineParser.addHelpOption();
commandLineParser.addPositionalArgument(PylonRecorder::tr("[file]"), PylonRecorder::tr("Image file to open.")); commandLineParser.addPositionalArgument(PylonRecorder::tr("[file]"), PylonRecorder::tr("Image file to open."));

View File

@ -68,33 +68,33 @@ PylonRecorder::PylonRecorder(QWidget *parent)
progressPalette.setBrush(QPalette::Highlight, QBrush(color)); progressPalette.setBrush(QPalette::Highlight, QBrush(color));
preassureBar->setPalette(progressPalette); preassureBar->setPalette(progressPalette);
QLabel *preassureLabel = new QLabel("Buffer preassure:", this); QLabel *preassureLabel = new QLabel("Buffer preassure:", this);
preassureLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;font-weight: Bold}"); preassureLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;font-weight: Bold}");
loadBar = new QProgressBar(this); loadBar = new QProgressBar(this);
loadBar->setRange(0, defaultBufferSize); loadBar->setRange(0, defaultBufferSize);
loadBar->setFixedSize(200, 25); loadBar->setFixedSize(200, 25);
QLabel *loadLabel = new QLabel("Load:", this); QLabel *loadLabel = new QLabel("Load:", this);
loadLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;font-weight: Bold}"); loadLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;font-weight: Bold}");
writingLabel = new QLabel("writing"); writingLabel = new QLabel("writing");
writingLabel->setEnabled(false); writingLabel->setEnabled(false);
writingLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;}"); writingLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;}");
grabbingLabel = new QLabel("grabbing"); grabbingLabel = new QLabel("grabbing");
grabbingLabel->setEnabled(false); grabbingLabel->setEnabled(false);
grabbingLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;}"); grabbingLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;}");
labelSwitch = false; labelSwitch = false;
cameraConnectedLabel = new QLabel("not connected"); cameraConnectedLabel = new QLabel("not connected");
cameraConnectedLabel->setStyleSheet("QLabel { color : red; }"); cameraConnectedLabel->setStyleSheet("QLabel { color : red; }");
cameraConnectedLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;}"); cameraConnectedLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;}");
fileLabel = new QLabel(); fileLabel = new QLabel();
fileLabel->setStyleSheet("QLabel{font-size: 11px;font-family: Arial;}"); fileLabel->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial;}");
QLabel *camHeader = new QLabel("Camera:"); QLabel *camHeader = new QLabel("Camera:");
camHeader->setStyleSheet("QLabel{font-size: 11px;font-family: Arial; font-weight: Bold}"); camHeader->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial; font-weight: Bold}");
QLabel *statusHeader = new QLabel("Status:"); QLabel *statusHeader = new QLabel("Status:");
statusHeader->setStyleSheet("QLabel{font-size: 11px;font-family: Arial; font-weight: Bold}"); statusHeader->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial; font-weight: Bold}");
QLabel *fileHeader = new QLabel("Output file:"); QLabel *fileHeader = new QLabel("Output file:");
fileHeader->setStyleSheet("QLabel{font-size: 11px;font-family: Arial; font-weight: Bold}"); fileHeader->setStyleSheet("QLabel{font-size: 11pt;font-family: Arial; font-weight: Bold}");
statusBar()->addWidget(camHeader); statusBar()->addWidget(camHeader);
statusBar()->addWidget(cameraConnectedLabel); statusBar()->addWidget(cameraConnectedLabel);
@ -436,7 +436,7 @@ void PylonRecorder::createActions() {
framerateSpinner->setSuffix("Hz"); framerateSpinner->setSuffix("Hz");
framerateSpinner->setFixedSize(80, 25); framerateSpinner->setFixedSize(80, 25);
framerateSpinner->setValue(defaultFrameRate); framerateSpinner->setValue(defaultFrameRate);
framerateSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}"); framerateSpinner->setStyleSheet("QSpinBox{font-size: 10pt;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}");
//framerateSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(255, 255, 255);background-color: rgb(38,56,76);}"); //framerateSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(255, 255, 255);background-color: rgb(38,56,76);}");
buffersizeSpinner = new QSpinBox(); buffersizeSpinner = new QSpinBox();
@ -444,26 +444,26 @@ void PylonRecorder::createActions() {
buffersizeSpinner->setSingleStep(25); buffersizeSpinner->setSingleStep(25);
buffersizeSpinner->setValue(defaultBufferSize); buffersizeSpinner->setValue(defaultBufferSize);
buffersizeSpinner->setFixedSize(100, 25); buffersizeSpinner->setFixedSize(100, 25);
buffersizeSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}"); buffersizeSpinner->setStyleSheet("QSpinBox{font-size: 10pt;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}");
exposureSpinner = new QSpinBox(); exposureSpinner = new QSpinBox();
exposureSpinner->setRange(10, 50000); exposureSpinner->setRange(10, 50000);
exposureSpinner->setSingleStep(50); exposureSpinner->setSingleStep(50);
exposureSpinner->setValue(defaultExposureTime); exposureSpinner->setValue(defaultExposureTime);
exposureSpinner->setFixedSize(120, 25); exposureSpinner->setFixedSize(120, 25);
exposureSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}"); exposureSpinner->setStyleSheet("QSpinBox{font-size: 10pt;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}");
gainSpinner = new QSpinBox(); gainSpinner = new QSpinBox();
gainSpinner->setRange(0, 24); gainSpinner->setRange(0, 24);
gainSpinner->setSingleStep(1); gainSpinner->setSingleStep(1);
gainSpinner->setValue(defaultGain); gainSpinner->setValue(defaultGain);
gainSpinner->setFixedSize(80, 25); gainSpinner->setFixedSize(80, 25);
gainSpinner->setStyleSheet("QSpinBox{font-size: 10px;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}"); gainSpinner->setStyleSheet("QSpinBox{font-size: 10pt;font-family: Arial;color: rgb(0, 0, 0);background-color: rgb(255,255,255);}");
dryRunCheckBox = new QCheckBox("Dry run, no writing"); dryRunCheckBox = new QCheckBox("Dry run, no writing");
dryRunCheckBox->setChecked(false); dryRunCheckBox->setChecked(false);
dryRunCheckBox->setFixedSize(150, 25); dryRunCheckBox->setFixedHeight(25);
dryRunCheckBox->setStyleSheet("QCheckBox{font-size: 12px;font-family: Arial;color: rgb(0, 0, 0);}"); dryRunCheckBox->setStyleSheet("QCheckBox{font-size: 12pt;font-family: Arial;color: rgb(0, 0, 0);}");
QToolBar *toolbar = addToolBar("main toolbar"); QToolBar *toolbar = addToolBar("main toolbar");
toolbar->addAction(exitAct); toolbar->addAction(exitAct);

View File

@ -94,9 +94,9 @@ private:
Writer *writer; Writer *writer;
bool grabbing, stopRequest, writing, labelSwitch, dryRun; bool grabbing, stopRequest, writing, labelSwitch, dryRun;
QPalette progressPalette; QPalette progressPalette;
QString activeLabelStyleHigh = "QLabel { font-size: 10px;font-family: Arial; color : red; }"; QString activeLabelStyleHigh = "QLabel { font-size: 10pt;font-family: Arial; color : red; }";
QString activeLabelStyleLow = "QLabel { font-size: 10px;font-family: Arial; color : cmyk(0, 255, 255, 0, 50); }"; QString activeLabelStyleLow = "QLabel { font-size: 10pt;font-family: Arial; color : cmyk(0, 255, 255, 0, 50); }";
QString inactiveLabelStyle = ("QLabel { font-size: 10px;font-family: Arial; color :gray; }"); QString inactiveLabelStyle = ("QLabel { font-size: 10pt;font-family: Arial; color :gray; }");
QSpinBox *framerateSpinner, *buffersizeSpinner, *exposureSpinner, *gainSpinner; QSpinBox *framerateSpinner, *buffersizeSpinner, *exposureSpinner, *gainSpinner;
QAction *selectStorageAction, *storeSettingsAction; QAction *selectStorageAction, *storeSettingsAction;
QString storageLocation = ""; QString storageLocation = "";