Commit dbd5a248 authored by Zren (Chris Holland)'s avatar Zren (Chris Holland)

Scale TitleTemplateDialog preview with the window

Removed the spacer below the textbox+preview so that the preview scales vertically.
Set the preview horizontal size policy to MinimumExpanding so it's not fixed to 200px wide.

Differential Revision:
parent 46e4bcc3
......@@ -82,6 +82,12 @@ QString TitleTemplateDialog::selectedText() const
return m_view.description->toPlainText();
void TitleTemplateDialog::resizeEvent(QResizeEvent *event)
void TitleTemplateDialog::updatePreview()
QString textTemplate = m_view.template_list->comboBox()->itemData(m_view.template_list->comboBox()->currentIndex()).toString();
......@@ -24,6 +24,8 @@ along with this program. If not, see <>.
#include "ui_templateclip_ui.h"
class QResizeEvent;
class TitleTemplateDialog : public QDialog
......@@ -33,6 +35,9 @@ public:
QString selectedTemplate() const;
QString selectedText() const;
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
Ui::TemplateClip_UI m_view;
......@@ -39,6 +39,12 @@
<item row="0" column="1">
<widget class="QLabel" name="preview">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<property name="minimumSize">
......@@ -54,19 +60,6 @@
<item row="2" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<property name="sizeHint" stdset="0">
<item row="3" column="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment