Skip to content

Commit

Permalink
fix: The category title is too black
Browse files Browse the repository at this point in the history
Log: Set word weight to 500, size to T7, color to 60% transparency
Issue: linuxdeepin/developer-center#7786
  • Loading branch information
mhduiy committed Apr 10, 2024
1 parent 0c7dea2 commit 699d67b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions launchercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ bool LauncherController::shouldAvoidHideOrActive()
return m_timer->isActive();
}

QFont LauncherController::boldFont(const QFont &f)
QFont LauncherController::adjustFontWeight(const QFont &f, QFont::Weight weight)
{
QFont font(f);
font.setWeight(QFont::Bold);
font.setWeight(weight);
return font;
}
2 changes: 1 addition & 1 deletion launchercontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class LauncherController : public QObject

Q_INVOKABLE void hideWithTimer();
Q_INVOKABLE bool shouldAvoidHideOrActive();
Q_INVOKABLE QFont boldFont(const QFont& f);
Q_INVOKABLE QFont adjustFontWeight(const QFont& f, QFont::Weight weight);

signals:
void currentFrameChanged();
Expand Down
3 changes: 2 additions & 1 deletion qml/windowed/AppListView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ Item {
QQC2.Label {
anchors.verticalCenter: parent.verticalCenter
text: headingBtn.text
font: LauncherController.boldFont(DTK.fontManager.t6)
font: LauncherController.adjustFontWeight(DTK.fontManager.t7, Font.Medium)
color: Qt.rgba(0, 0, 0, 0.6)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion qml/windowed/FrequentlyUsedView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Control {

Label {
text: qsTr("Frequently Used")
font: LauncherController.boldFont(DTK.fontManager.t6)
font: LauncherController.adjustFontWeight(DTK.fontManager.t6, Font.Bold)
}

GridViewContainer {
Expand Down
2 changes: 1 addition & 1 deletion qml/windowed/RecentlyInstalledView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Control {
spacing: 0
Label {
text: qsTr("Recently Installed")
font: LauncherController.boldFont(DTK.fontManager.t6)
font: LauncherController.adjustFontWeight(DTK.fontManager.t6, Font.Bold)
}

GridViewContainer {
Expand Down
2 changes: 1 addition & 1 deletion qml/windowed/SearchResultView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Control {

Label {
text: qsTr("All Apps")
font: LauncherController.boldFont(DTK.fontManager.t6)
font: LauncherController.adjustFontWeight(DTK.fontManager.t6, Font.Bold)
}

GridViewContainer {
Expand Down
2 changes: 1 addition & 1 deletion qml/windowed/WindowedFrame.qml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Item {
backgroundAlpha: 0.8
width: 370
height: 312
folderNameFont: LauncherController.boldFont(DTK.fontManager.t6)
folderNameFont: LauncherController.adjustFontWeight(DTK.fontManager.t6, Font.Bold)

onVisibleChanged: function (visible) {
if (!visible) {
Expand Down

0 comments on commit 699d67b

Please sign in to comment.