X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fwizard.h;h=769bf766ad5452019e935aff6a7de4ed52d9193d;hb=db3694392bf3dcba334d6bb1b8923afe61e5dc09;hp=134009cba2bfc7e20d576062ad6586f9c49ece27;hpb=89b6a842077844b0a68c3cc5ac471f57487f9ff2;p=kdenlive diff --git a/src/wizard.h b/src/wizard.h index 134009cb..769bf766 100644 --- a/src/wizard.h +++ b/src/wizard.h @@ -42,18 +42,17 @@ public: } void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { if (index.column() == 1) { - const bool hover = option.state & (QStyle::State_Selected); - QRect r1 = option.rect; painter->save(); - if (hover) { - painter->setPen(option.palette.color(QPalette::HighlightedText)); - QColor backgroundColor = option.palette.color(QPalette::Highlight); - painter->setBrush(QBrush(backgroundColor)); - painter->fillRect(r1, backgroundColor); - } + QStyleOptionViewItemV4 opt(option); + QStyle *style = opt.widget ? opt.widget->style() : QApplication::style(); + const int textMargin = style->pixelMetric(QStyle::PM_FocusFrameHMargin) + 1; + style->drawPrimitive(QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget); + QFont font = painter->font(); font.setBold(true); painter->setFont(font); + QRect r1 = option.rect; + r1.adjust(0, textMargin, 0, - textMargin); int mid = (int)((r1.height() / 2)); r1.setBottom(r1.y() + mid); QRect r2 = option.rect; @@ -62,7 +61,6 @@ public: font.setBold(false); painter->setFont(font); QString subText = index.data(Qt::UserRole).toString(); - painter->setPen(option.palette.color(QPalette::Mid)); painter->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter , subText); painter->restore(); } else { @@ -90,11 +88,13 @@ private: Ui::WizardCheck_UI m_check; QVBoxLayout *m_startLayout; bool m_systemCheckIsOk; + QLabel *m_welcomeLabel; QMap m_dvProfiles; QMap m_hdvProfiles; QMap m_otherProfiles; void slotCheckPrograms(); void checkMltComponents(); + void checkMissingCodecs(); KIcon m_okIcon; KIcon m_badIcon; @@ -108,6 +108,7 @@ private slots: void slotUpdateCaptureParameters(); void slotSaveCaptureFormat(); void slotUpdateDecklinkDevice(int captureCard); + void slotOpenManual(); }; #endif