]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/PanelStack.cpp
Use QFontMetrics information for underlines (and friends) width and position
[lyx.git] / src / frontends / qt4 / PanelStack.cpp
index aeb389d5dfd49c7e8dbecd032469a9a09a22c1ef..b2024b11998a92d972b5d6bc2ac11a7586c83a24 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <QAbstractButton>
 #include <QApplication>
-#include <QColorGroup>
 #include <QComboBox>
 #include <QFontMetrics>
 #include <QGroupBox>
@@ -61,7 +60,7 @@ PanelStack::PanelStack(QWidget * parent)
        list_->setRootIsDecorated(false);
        list_->setColumnCount(1);
        list_->header()->hide();
-       list_->header()->setResizeMode(QHeaderView::ResizeToContents);
+       setSectionResizeMode(list_->header(), QHeaderView::ResizeToContents);
        list_->header()->setStretchLastSection(false);
        list_->setMinimumSize(list_->viewport()->size());
 
@@ -76,7 +75,7 @@ PanelStack::PanelStack(QWidget * parent)
 #endif
 
 #if QT_VERSION >= 0x040600
-       search_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "png"));
+       search_->setButtonPixmap(FancyLineEdit::Right, getPixmap("images/", "editclear", "svgz,png"));
        search_->setButtonVisible(FancyLineEdit::Right, true);
        search_->setButtonToolTip(FancyLineEdit::Right, qt_("Clear text"));
        search_->setAutoHideButton(FancyLineEdit::Right, true);
@@ -106,13 +105,13 @@ void PanelStack::addCategory(QString const & name, QString const & parent)
 
        if (parent.isEmpty()) {
                item = new QTreeWidgetItem(list_);
-               item->setText(0, name);
+               item->setText(0, qt_(name));
        }
        else {
                if (!panel_map_.contains(parent))
                        addCategory(parent);
                item = new QTreeWidgetItem(panel_map_.value(parent));
-               item->setText(0, name);
+               item->setText(0, qt_(name));
                depth = 2;
                list_->setRootIsDecorated(true);
        }