Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use brighter color in SiColor.SIDE_MSG_THEME_NORMAL #143

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,7 @@ def set_message_box_auto_close(self, value):
if isinstance(value, bool):
self.message_auto_close = value
if isinstance(value, str):
self.message_auto_close_duration = int(float(value) * 1000)
try:
self.message_auto_close_duration = int(float(value) * 1000)
except ValueError:
self.message_auto_close_duration = 1
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont

from siui.components import SiPixLabel
from siui.components.option_card import SiOptionCardLinear, SiOptionCardPlane
Expand All @@ -16,7 +17,7 @@
SiSimpleButton,
SiSwitch,
)
from siui.core import GlobalFont, Si, SiColor, SiGlobal, SiQuickEffect
from siui.core import GlobalFont, Si, SiColor, SiGlobal, SiQuickEffect, GlobalFontSize
from siui.gui import SiFont

from .components.themed_option_card import ThemedOptionCardPlane
Expand Down Expand Up @@ -54,7 +55,7 @@ def __init__(self, *args, **kwargs):
self.title.setAlignment(Qt.AlignVCenter | Qt.AlignLeft)
self.title.setText("Silicon UI")
self.title.setStyleSheet("color: {}".format(SiGlobal.siui.colors["TEXT_A"]))
self.title.setFont(SiFont.tokenized(GlobalFont.XL_NORMAL))
self.title.setFont(SiFont.getFont(size=GlobalFontSize.XL.value, weight=QFont.Weight.Medium))

self.subtitle = SiLabel(self.head_area)
self.subtitle.setGeometry(64, 72, 500, 48)
Expand Down
20 changes: 11 additions & 9 deletions examples/My-TODOs/components/page_about/page_about.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from PyQt5.QtCore import Qt, QUrl
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QSizePolicy

from siui.components import SiTitledWidgetGroup, SiOptionCardLinear, SiPushButton, SiSimpleButton, SiPixLabel, \
SiDenseVContainer, SiLabel
from siui.components import (
SiDenseVContainer,
SiLabel,
SiOptionCardLinear,
SiPixLabel,
SiSimpleButton,
SiTitledWidgetGroup,
)
from siui.components.page import SiPage
from siui.core import SiColor
from siui.core import SiQuickEffect
from siui.core import SiGlobal
from siui.core import Si
from siui.gui import GlobalFont
from siui.core import GlobalFont, Si, SiColor, SiGlobal, SiQuickEffect
from siui.gui import SiFont


class About(SiPage):
Expand All @@ -35,7 +37,7 @@ def __init__(self, *args, **kwargs):

self.version_label = SiLabel(self)
self.version_label.setSiliconWidgetFlag(Si.AdjustSizeOnTextChanged)
self.version_label.setFont(GlobalFont.M_NORMAL.value)
self.version_label.setFont(SiFont.tokenized(GlobalFont.M_NORMAL))
self.version_label.setStyleSheet(f"color: {self.colorGroup().fromToken(SiColor.TEXT_D)}")
self.version_label.setText("PyQt-SiliconUI")

Expand Down
12 changes: 4 additions & 8 deletions siui/components/progress_bar/progress_bar.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import numpy
from PyQt5.QtCore import pyqtSignal, Qt
from PyQt5.QtGui import QPainter, QPen, QColor

from siui.components.widgets.abstracts.widget import SiWidget
from siui.core import SiExpAnimation
from siui.core import ABCSiAnimation
from siui.core import SiColor
from siui.core import SiGlobal
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtGui import QColor, QPainter, QPen

from siui.components.widgets import SiLabel
from siui.core import ABCSiAnimation, SiColor, SiExpAnimation


class SiProgressBar(SiLabel):
Expand Down
2 changes: 1 addition & 1 deletion siui/gui/color_group/dark.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self):
self.assign(SiColor.TEXT_THEME, "#c58bc2")

self.assign(SiColor.SIDE_MSG_FLASH, "#90FFFFFF")
self.assign(SiColor.SIDE_MSG_THEME_NORMAL, "#242027")
self.assign(SiColor.SIDE_MSG_THEME_NORMAL, "#4C4554")
self.assign(SiColor.SIDE_MSG_THEME_SUCCESS, "#519868")
self.assign(SiColor.SIDE_MSG_THEME_INFO, "#855198")
self.assign(SiColor.SIDE_MSG_THEME_WARNING, "#986351")
Expand Down
Loading