diff --git a/frontend/cmake/ui-components.cmake b/frontend/cmake/ui-components.cmake index 34f4c0e7f..9b7c6c16c 100644 --- a/frontend/cmake/ui-components.cmake +++ b/frontend/cmake/ui-components.cmake @@ -44,6 +44,8 @@ target_sources( components/FocusList.hpp components/GameCaptureToolbar.cpp components/GameCaptureToolbar.hpp + components/InfoChip.cpp + components/InfoChip.hpp components/ImageSourceToolbar.cpp components/ImageSourceToolbar.hpp components/MediaControls.cpp diff --git a/frontend/components/InfoChip.cpp b/frontend/components/InfoChip.cpp new file mode 100644 index 000000000..143eada5f --- /dev/null +++ b/frontend/components/InfoChip.cpp @@ -0,0 +1,28 @@ +/****************************************************************************** + Copyright (C) 2026 by Warchamp7 + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +******************************************************************************/ + +#include "InfoChip.hpp" + +InfoChip::InfoChip(QWidget *parent) : QLabel(parent) +{ + setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); +} + +InfoChip::InfoChip(const QString &text, QWidget *parent) : InfoChip(parent) +{ + setText(text); +} diff --git a/frontend/components/InfoChip.hpp b/frontend/components/InfoChip.hpp new file mode 100644 index 000000000..aba0df13e --- /dev/null +++ b/frontend/components/InfoChip.hpp @@ -0,0 +1,28 @@ +/****************************************************************************** + Copyright (C) 2026 by Warchamp7 + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +******************************************************************************/ + +#pragma once + +#include + +class InfoChip : public QLabel { + Q_OBJECT + +public: + explicit InfoChip(QWidget *parent); + explicit InfoChip(const QString &text, QWidget *parent); +}; diff --git a/frontend/data/themes/Yami.obt b/frontend/data/themes/Yami.obt index efe21cc89..3e76c7427 100644 --- a/frontend/data/themes/Yami.obt +++ b/frontend/data/themes/Yami.obt @@ -111,9 +111,6 @@ --primary_dark: var(--blue4); --primary_darker: var(--blue5); - --warning: var(--yellow3); - --danger: var(--red3); - --text: var(--white1); --text_light: var(--white1); --text_muted: var(--white5); @@ -303,6 +300,30 @@ background-color: var(--bg_base); } +.bg-primary { + background-color: var(--primary); +} + +.bg-secondary { + background-color: var(--teal3); +} + +.bg-info { + background-color: var(--grey8); +} + +.bg-warning { + background-color: var(--yellow6); +} + +.bg-danger { + background-color: var(--red6); +} + +.bg-success { + background-color: var(--green6); +} + .text-title { font-size: var(--font_large); font-weight: bold; @@ -342,17 +363,37 @@ } .text-warning { - color: var(--warning); + color: var(--yellow3); } .text-danger { - color: var(--danger); + color: var(--red3); } .text-success { color: var(--green3); } +.bg-secondary.text-secondary { + color: var(--teal1); +} + +.bg-info.text-info { + color: var(--text_light); +} + +.bg-warning.text-warning { + color: var(--yellow1); +} + +.bg-danger.text-danger { + color: var(--red1); +} + +.bg-success.text-success { + color: var(--green1); +} + .frame-notice { background: var(--grey8); border: 1px solid var(--grey6); @@ -2517,6 +2558,13 @@ SourceSelectButton:pressed:hover { border-color: var(--button_border); } +InfoChip { + font-size: var(--font_small); + font-weight: bold; + padding: 0 var(--padding_large); + border-radius: var(--border_radius); +} + /* Idian Widgets */ idian--ListHeader { border-radius: var(--border_radius);