Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 53a1bfcc rédigé par Kubat's avatar Kubat
Parcourir les fichiers

FONT: Set custom font and style for the AssLinesView

parent 835fa67c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!10UI improvements
...@@ -9,13 +9,6 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept ...@@ -9,13 +9,6 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept
: QTableView(parent) : QTableView(parent)
, delegate(new Delegate(this)) , delegate(new Delegate(this))
{ {
// Force the 9pt font size for now
{
QFont f = font();
f.setPointSize(9);
setFont(f);
}
setMouseTracking(true); setMouseTracking(true);
setItemDelegate(delegate); setItemDelegate(delegate);
connect(this, &AssLinesView::hoverIndexChanged, delegate, connect(this, &AssLinesView::hoverIndexChanged, delegate,
...@@ -30,23 +23,19 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept ...@@ -30,23 +23,19 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept
setSelectionBehavior(QAbstractItemView::SelectRows); setSelectionBehavior(QAbstractItemView::SelectRows);
setShowGrid(false); setShowGrid(false);
// Also set the 9pt font size for the headers static const QString style = "* { font-family: \"FiraCode\"; font-size: 8pt; }"
{ "QTableView::item:selected {"
QFont f = horizontalHeader()->font();
f.setPointSize(9);
horizontalHeader()->setFont(f);
verticalHeader()->setFont(f);
}
static const QString style = "QTableView::item:selected {"
" border-top:1px solid #1394B4;" " border-top:1px solid #1394B4;"
" border-bottom:1px solid #1394B4;" " border-bottom:1px solid #1394B4;"
" border-right:1px solid #1394B4;" " border-right:1px solid #1394B4;"
" border-left:1px solid #1394B4;" " border-left:1px solid #1394B4;"
" background-color: #002B36;" " background-color: #002B36;"
" color: white;"
"}" "}"
"QTableView::item {" "QTableView::item {"
" border: 1px solid #474747;" " border: 1px solid #474747;"
" background-color: #232629;"
" color: white;"
"};" "};"
"QTableView::item:last:selected {" "QTableView::item:last:selected {"
" border-top:1px solid #1394B4;" " border-top:1px solid #1394B4;"
...@@ -54,6 +43,7 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept ...@@ -54,6 +43,7 @@ AssLinesView::AssLinesView(QAbstractItemModel *model, QWidget *parent) noexcept
" border-right:1px solid #1394B4;" " border-right:1px solid #1394B4;"
" border-left:1px solid #1394B4;" " border-left:1px solid #1394B4;"
" background-color: #002B36;" " background-color: #002B36;"
" color: white;"
"}"; "}";
setStyleSheet(style); setStyleSheet(style);
setModel(model); setModel(model);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter