mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
macOS: Fix qt5.12 scale issues and dark mode (#3588)
* Maybe fix QT 5.12 scale. * Use Palette colors
This commit is contained in:
parent
e68305d7bf
commit
45b16ba78d
12 changed files with 32 additions and 21 deletions
|
|
@ -34,7 +34,7 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor,
|
|||
mentionFormat.setFontWeight(QFont::Bold);
|
||||
|
||||
mentionFormatOtherUser.setFontWeight(QFont::Bold);
|
||||
mentionFormatOtherUser.setForeground(Qt::blue);
|
||||
mentionFormatOtherUser.setForeground(palette().link());
|
||||
mentionFormatOtherUser.setAnchor(true);
|
||||
|
||||
viewport()->setCursor(Qt::IBeamCursor);
|
||||
|
|
@ -60,7 +60,11 @@ QTextCursor ChatView::prepareBlock(bool same)
|
|||
} else {
|
||||
QTextBlockFormat blockFormat;
|
||||
if ((evenNumber = !evenNumber))
|
||||
blockFormat.setBackground(palette().alternateBase());
|
||||
blockFormat.setBackground(palette().window());
|
||||
else
|
||||
blockFormat.setBackground(palette().base());
|
||||
|
||||
blockFormat.setForeground(palette().text());
|
||||
blockFormat.setBottomMargin(4);
|
||||
cursor.insertBlock(blockFormat);
|
||||
}
|
||||
|
|
@ -95,7 +99,7 @@ void ChatView::appendCardTag(QTextCursor &cursor, const QString &cardName)
|
|||
{
|
||||
QTextCharFormat oldFormat = cursor.charFormat();
|
||||
QTextCharFormat anchorFormat = oldFormat;
|
||||
anchorFormat.setForeground(Qt::blue);
|
||||
anchorFormat.setForeground(palette().link());
|
||||
anchorFormat.setAnchor(true);
|
||||
anchorFormat.setAnchorHref("card://" + cardName);
|
||||
anchorFormat.setFontItalic(true);
|
||||
|
|
@ -112,10 +116,10 @@ void ChatView::appendUrlTag(QTextCursor &cursor, QString url)
|
|||
|
||||
QTextCharFormat oldFormat = cursor.charFormat();
|
||||
QTextCharFormat anchorFormat = oldFormat;
|
||||
anchorFormat.setForeground(Qt::blue);
|
||||
anchorFormat.setForeground(palette().link());
|
||||
anchorFormat.setAnchor(true);
|
||||
anchorFormat.setAnchorHref(url);
|
||||
anchorFormat.setUnderlineColor(Qt::blue);
|
||||
anchorFormat.setUnderlineColor(palette().link().color());
|
||||
anchorFormat.setFontUnderline(true);
|
||||
|
||||
cursor.setCharFormat(anchorFormat);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue