DecoderSelector: Make decoder tag names fully visible
[pulseview.git] / pv / subwindows / decoder_selector / subwindow.cpp
index 3a917190b6f263091aac8b2a9cd5987fe85af056..086b0064ec04d2354d76abd267a7da177afb54e0 100644 (file)
@@ -105,13 +105,23 @@ SubWindow::SubWindow(Session& session, QWidget* parent) :
        // Hide the columns that hold the detailed item information
        tree_view_->hideColumn(2);  // ID
 
+       // Ensure that all decoder tag names are fully visible by default
+       tree_view_->resizeColumnToContents(0);
+
        info_box_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
        QVBoxLayout* info_box_layout = new QVBoxLayout(info_box_);
        info_box_layout->addWidget(info_label_header_);
        info_box_layout->addWidget(info_label_body_);
        info_box_layout->addWidget(info_label_footer_);
+       info_box_layout->setAlignment(Qt::AlignTop);
+       Qt::TextInteractionFlags flags = Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard;
+       info_label_header_->setWordWrap(true);
+       info_label_header_->setTextInteractionFlags(flags);
        info_label_body_->setWordWrap(true);
+       info_label_body_->setTextInteractionFlags(flags);
        info_label_body_->setText(tr("Select a decoder to see its description here."));
+       info_label_footer_->setWordWrap(true);
+       info_label_footer_->setTextInteractionFlags(flags);
 
        connect(filter, SIGNAL(textChanged(const QString&)),
                this, SLOT(on_filter_changed(const QString&)));