mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
GuiDocument.cpp: fix bug 10777
- the column width must be as wide as the column header text
- also center the radiobuttons in the table
- also use alternating colors for the table rows
(cherry picked from commit a69f1a9e16
)
This commit is contained in:
parent
f711e44bcf
commit
eb172be29b
@ -1213,7 +1213,7 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
headers << qt_("Package") << qt_("Load automatically")
|
||||
<< qt_("Load always") << qt_("Do not load");
|
||||
mathsModule->packagesTW->setHorizontalHeaderLabels(headers);
|
||||
setSectionResizeMode(mathsModule->packagesTW->horizontalHeader(), QHeaderView::Stretch);
|
||||
setSectionResizeMode(mathsModule->packagesTW->horizontalHeader(), QHeaderView::ResizeToContents);
|
||||
map<string, string> const & packages = BufferParams::auto_packages();
|
||||
mathsModule->packagesTW->setRowCount(packages.size());
|
||||
int i = 0;
|
||||
@ -1252,6 +1252,11 @@ GuiDocument::GuiDocument(GuiView & lv)
|
||||
mathsModule->packagesTW->setCellWidget(i, 1, autoRB);
|
||||
mathsModule->packagesTW->setCellWidget(i, 2, alwaysRB);
|
||||
mathsModule->packagesTW->setCellWidget(i, 3, neverRB);
|
||||
//center the table contents
|
||||
pack->setTextAlignment(Qt::AlignHCenter);
|
||||
autoRB->setStyleSheet("margin-left:50%; margin-right:50%;");
|
||||
alwaysRB->setStyleSheet("margin-left:50%; margin-right:50%;");
|
||||
neverRB->setStyleSheet("margin-left:50%; margin-right:50%;");
|
||||
|
||||
connect(autoRB, SIGNAL(clicked()),
|
||||
this, SLOT(change_adaptor()));
|
||||
|
@ -179,6 +179,9 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>4</number>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user