[qet] [1927] Project closing dialog: fixed "Action" header alignment |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 1927
Author: xavier
Date: 2012-08-05 19:15:01 +0200 (Sun, 05 Aug 2012)
Log Message:
-----------
Project closing dialog: fixed "Action" header alignment
Modified Paths:
--------------
trunk/sources/closediagramsdialog.cpp
Modified: trunk/sources/closediagramsdialog.cpp
===================================================================
--- trunk/sources/closediagramsdialog.cpp 2012-08-05 17:10:59 UTC (rev 1926)
+++ trunk/sources/closediagramsdialog.cpp 2012-08-05 17:15:01 UTC (rev 1927)
@@ -108,6 +108,7 @@
all_checkbox_ -> setChecked(true);
connect(all_checkbox_, SIGNAL(stateChanged(int)), this, SLOT(topCheckBoxChangedState(int)));
QWidget *header_widget = diagrams_list_.count() > 1 ? static_cast<QWidget *>(all_checkbox_) : static_cast<QWidget *>(action_label);
+ Qt::Alignment header_alignment = diagrams_list_.count() > 1 ? Qt::AlignLeft : Qt::AlignCenter;
// spacers inserted in the header row
QSpacerItem *spacer1 = new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum);
@@ -122,7 +123,7 @@
diagrams_list_layout_ -> addItem(spacer1, 0, 2);
diagrams_list_layout_ -> addWidget(state_label, 0, 3, 1, 1, Qt::AlignCenter);
diagrams_list_layout_ -> addItem(spacer2, 0, 4);
- diagrams_list_layout_ -> addWidget(header_widget, 0, 5, 1, 1, Qt::AlignCenter);
+ diagrams_list_layout_ -> addWidget(header_widget, 0, 5, 1, 1, header_alignment);
// widget
diagrams_list_widget_ = new QWidget();
@@ -188,7 +189,7 @@
diagrams_list_layout_ -> addWidget(diagram_show, row_id, 0, 1, 1, Qt::AlignCenter);
diagrams_list_layout_ -> addWidget(diagram_title, row_id, 1, 1, 1, Qt::AlignCenter);
diagrams_list_layout_ -> addWidget(diagram_status, row_id, 3, 1, 1, Qt::AlignCenter);
- diagrams_list_layout_ -> addWidget(diagram_checkbox, row_id, 5, 1, 1, Qt::AlignCenter);
+ diagrams_list_layout_ -> addWidget(diagram_checkbox, row_id, 5, 1, 1, Qt::AlignLeft);
}
/**