mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Print: adjustments to PrintDialog
- Hide the sizeing sliders from PrintOptions. we don't really support any of those in PrintLayout and these are not that useful and easy to implement, until some sort of layouting/templating system is in place. - Move the 'Print' button on top as a workaround, since if it's bellow the print options it stays bellow an empty area where the now hidden sizing sliders are. - Resize the dialog to a smaller size Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
a268311a0b
commit
f183da546b
2 changed files with 10 additions and 2 deletions
|
@ -27,13 +27,14 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f)
|
||||||
|
|
||||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
layout->addWidget(optionsWidget);
|
|
||||||
|
|
||||||
QPushButton *printButton = new QPushButton(tr("&Print"));
|
QPushButton *printButton = new QPushButton(tr("&Print"));
|
||||||
connect(printButton, SIGNAL(clicked(bool)), this, SLOT(printClicked()));
|
connect(printButton, SIGNAL(clicked(bool)), this, SLOT(printClicked()));
|
||||||
layout->addWidget(printButton);
|
layout->addWidget(printButton);
|
||||||
|
|
||||||
setFixedSize(520, 500);
|
layout->addWidget(optionsWidget);
|
||||||
|
|
||||||
|
setFixedSize(520, 320);
|
||||||
setWindowTitle("Print");
|
setWindowTitle("Print");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,13 @@ PrintOptions::PrintOptions(QWidget *parent, struct options *printOpt)
|
||||||
|
|
||||||
void PrintOptions::setup(struct options *printOpt)
|
void PrintOptions::setup(struct options *printOpt)
|
||||||
{
|
{
|
||||||
|
/* these options are not supported ATM and we hide them.
|
||||||
|
* basically the entire PrintDialog class needs re-implementation, so that
|
||||||
|
* the paper size, DPI and all other options are displayed in one dialog.
|
||||||
|
* this way we can print directly or do an optional preview first.
|
||||||
|
*/
|
||||||
|
ui.sizingHeights->setVisible(false);
|
||||||
|
|
||||||
printOptions = printOpt;
|
printOptions = printOpt;
|
||||||
// layout height sliders
|
// layout height sliders
|
||||||
initSliderWithLabel(ui.sliderPHeight, ui.valuePHeight, printOptions->profile_height);
|
initSliderWithLabel(ui.sliderPHeight, ui.valuePHeight, printOptions->profile_height);
|
||||||
|
|
Loading…
Add table
Reference in a new issue