From 422333ac630458ff4f89a4d1e922effe9ec1ea93 Mon Sep 17 00:00:00 2001 From: Anne Jan Brouwer Date: Sun, 9 Aug 2015 19:01:48 +0200 Subject: cleanup, sizing of template fields --- mainwindow.cpp | 13 ++++++++++++- mainwindow.ui | 19 +++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 34ba2256..ce7ce719 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -700,8 +700,19 @@ void MainWindow::readyRead(bool finished = false) { } } } - + if (ui->formLayout->count() == 0) { + ui->verticalLayoutPassword->setSpacing(0); + } else { + ui->verticalLayoutPassword->setSpacing(6); + } output = tokens.join("\n"); + } else { + while(ui->formLayout->count() > 0){ + QLayoutItem *item = ui->formLayout->takeAt(0); + delete item->widget(); + delete item; + } + ui->verticalLayoutPassword->setSpacing(0); } } output.replace(QRegExp("<"), "<"); diff --git a/mainwindow.ui b/mainwindow.ui index ab43bbd6..87c93102 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -149,7 +149,14 @@ 0 - + + + QFormLayout::AllNonFixedFieldsGrow + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + @@ -157,11 +164,11 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; font-weight:600; color:#333333;">QtPass</span><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; color:#333333;"> is a GUI for </span><a href="http://www.passwordstore.org/"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;">pass</span></a><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; color:#333333;">, the standard unix password manager.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; color:#333333;"><br />Please report any </span><a href="https://github.com/IJHack/qtpass/issues"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; text-decoration: underline; color:#4183c4;">issues</span></a><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; color:#333333;"> you might have with this software.</span></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://qtpass.org/"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;">Documentation</span></a></p> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/IJHack/qtpass"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-size:13pt; text-decoration: underline; color:#4183c4; background-color:transparent;">Source code</span></a></p></body></html> +</style></head><body style=" font-family:'.Helvetica Neue DeskInterface'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; font-weight:600; color:#333333;">QtPass</span><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; color:#333333;"> is a GUI for </span><a href="http://www.passwordstore.org/"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; text-decoration: underline; color:#4183c4; background-color:transparent;">pass</span></a><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; color:#333333;">, the standard unix password manager.</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; color:#333333;"><br />Please report any </span><a href="https://github.com/IJHack/qtpass/issues"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; text-decoration: underline; color:#4183c4;">issues</span></a><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; color:#333333;"> you might have with this software.</span></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://qtpass.org/"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; text-decoration: underline; color:#4183c4; background-color:transparent;">Documentation</span></a></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/IJHack/qtpass"><span style=" font-family:'Helvetica Neue,Helvetica,Segoe UI,Arial,freesans,sans-serif'; text-decoration: underline; color:#4183c4; background-color:transparent;">Source code</span></a></p></body></html> -- cgit v1.2.3