From 2ec93410616c86a3fd0e4464d34c4b5da77b13d5 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 16 Nov 2005 11:02:28 +0000 Subject: *** empty log message *** --- src/mainwindow.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/mainwindow.cc') diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 279fab6..1454b2e 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -193,17 +193,22 @@ void MainWindow::createGui() // QGridLayout *g2 = new QGridLayout(1, NUM_HISTORY, -1); // QVBoxLayout *g2 = new QVBoxLayout(this); // g0->addLayout(g2, 0, 1); - gb->setInsideMargin(25); + + gb->setInsideMargin(HISTORY_LIST_MARGIN); + gb->setInsideSpacing(HISTORY_LIST_SPACING); gb->setFlat(true); g0->addWidget(gb, 0, 1); - int output_width = this->width() - + int resolution_w = config->readInt("pixel_width"); + int resolution_h = config->readInt("pixel_height"); + + int output_width = resolution_w - // this->width() - (int)(BUTTON_WIDTH * unit) - (gb->insideMargin() * 2) - g1->margin() * 2 - g0->margin() * 2; - int output_height = this->height() - + int output_height = resolution_h - // this->height() - (int)(3 * BUTTON_HEIGHT * unit) - g1->margin() * 5 - g0->margin() * 3; @@ -264,7 +269,9 @@ void MainWindow::createGui() int h = (int)(576.0f / (720.0f / ((float)BUTTON_WIDTH * unit))); int window_height = config->readInt("pixel_height"); - this->num_history = (window_height - ((int)unit * BUTTON_HEIGHT)) / h; + this->num_history = (window_height - + ((int)unit * BUTTON_HEIGHT + HISTORY_LIST_SPACING ) - + (2 * HISTORY_LIST_MARGIN)) / (h + HISTORY_LIST_SPACING); img_history = new (HistoryWidget*)[this->num_history]; for(unsigned int i = 0; i < num_history; i++) { @@ -288,7 +295,7 @@ void MainWindow::createGui() lbl_recordtime->setFixedWidth((int)(BUTTON_WIDTH * unit) + (gb->insideMargin() * 2) + g1->margin() * 2 + - g0->margin() * 2); + g0->margin() * 2 + 100); status->addWidget(lbl_recordtime, 0, TRUE); // About button @@ -321,6 +328,7 @@ QPushButton *MainWindow::createButton(char *caption, QWidget *parent, int width, QPushButton *btn = new QPushButton(caption, parent); btn->setFont( QFont( "Sans Serif", (int)(unit * height / 2), QFont::Bold ) ); btn->setFixedHeight((int)(unit * height)); + btn->setFixedWidth((int)(unit * width)); return btn; } @@ -333,6 +341,7 @@ QLabel *MainWindow::createLabel(char *caption, int width, int height) (int)(unit * height / 2), (height>1)?QFont::Bold:QFont::Normal ) ); lbl->setFixedHeight((int)(unit * height)); + // lbl->setFixedWidth((int)(unit * width)); return lbl; } -- cgit v1.2.3