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

cleanup: Rename all .css files to .qss. #120

Merged
merged 1 commit into from
Jan 1, 2025
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
92 changes: 46 additions & 46 deletions res.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@
<file>img/taskbar/light/taskbar_online.svg</file>
<file>img/transfer.svg</file>
<file>themes/dark/acceptCall/acceptCall.svg</file>
<file>themes/dark/addFriendForm/toxId.css</file>
<file>themes/dark/chatArea/chatArea.css</file>
<file>themes/dark/chatArea/chatHead.css</file>
<file>themes/dark/addFriendForm/toxId.qss</file>
<file>themes/dark/chatArea/chatArea.qss</file>
<file>themes/dark/chatArea/chatHead.qss</file>
<file>themes/dark/chatArea/error.svg</file>
<file>themes/dark/chatArea/info.svg</file>
<file>themes/dark/chatArea/innerStyle.css</file>
<file>themes/dark/chatArea/innerStyle.qss</file>
<file>themes/dark/chatArea/scrollBarDownArrow.svg</file>
<file>themes/dark/chatArea/scrollBarLeftArrow.svg</file>
<file>themes/dark/chatArea/scrollBarRightArrow.svg</file>
<file>themes/dark/chatArea/scrollBarUpArrow.svg</file>
<file>themes/dark/chatArea/spinner.svg</file>
<file>themes/dark/chatArea/typing.svg</file>
<file>themes/dark/chatForm/buttons.css</file>
<file>themes/dark/chatForm/buttons.qss</file>
<file>themes/dark/chatForm/callButton.svg</file>
<file>themes/dark/chatForm/emoteButton.svg</file>
<file>themes/dark/chatForm/exitFullScreenButton.svg</file>
<file>themes/dark/chatForm/fileButton.svg</file>
<file>themes/dark/chatForm/fullScreenButtons.css</file>
<file>themes/dark/chatForm/labels.css</file>
<file>themes/dark/chatForm/fullScreenButtons.qss</file>
<file>themes/dark/chatForm/labels.qss</file>
<file>themes/dark/chatForm/micButton.svg</file>
<file>themes/dark/chatForm/micButtonRed.svg</file>
<file>themes/dark/chatForm/screenshotButton.svg</file>
Expand All @@ -82,60 +82,60 @@
<file>themes/dark/chatForm/videoPreviewRed.svg</file>
<file>themes/dark/chatForm/volButton.svg</file>
<file>themes/dark/chatForm/volButtonRed.svg</file>
<file>themes/dark/contentDialog/contentDialog.css</file>
<file>themes/dark/contentDialog/contentDialog.qss</file>
<file>themes/dark/emoticonWidget/dot_page_current.svg</file>
<file>themes/dark/emoticonWidget/dot_page_hover.svg</file>
<file>themes/dark/emoticonWidget/dot_page.svg</file>
<file>themes/dark/emoticonWidget/emoticonWidget.css</file>
<file>themes/dark/emoticonWidget/emoticonWidget.qss</file>
<file>themes/dark/fileTransferInstance/arrow_black.svg</file>
<file>themes/dark/fileTransferInstance/arrow_white.svg</file>
<file>themes/dark/fileTransferInstance/browse.svg</file>
<file>themes/dark/fileTransferInstance/dir.svg</file>
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
<file>themes/dark/fileTransferInstance/filetransferWidget.qss</file>
<file>themes/dark/fileTransferInstance/no_dark.svg</file>
<file>themes/dark/fileTransferInstance/no.svg</file>
<file>themes/dark/fileTransferInstance/pause_dark.svg</file>
<file>themes/dark/fileTransferInstance/pause.svg</file>
<file>themes/dark/fileTransferInstance/yes.svg</file>
<file>themes/dark/fileTransferWidget/fileDone.svg</file>
<file>themes/dark/friendList/friendList.css</file>
<file>themes/dark/genericChatForm/genericChatForm.css</file>
<file>themes/dark/genericChatRoomWidget/genericChatRoomWidget.css</file>
<file>themes/dark/loginScreen/loginScreen.css</file>
<file>themes/dark/msgEdit/msgEdit.css</file>
<file>themes/dark/notificationEdge/notificationEdge.css</file>
<file>themes/dark/friendList/friendList.qss</file>
<file>themes/dark/genericChatForm/genericChatForm.qss</file>
<file>themes/dark/genericChatRoomWidget/genericChatRoomWidget.qss</file>
<file>themes/dark/loginScreen/loginScreen.qss</file>
<file>themes/dark/msgEdit/msgEdit.qss</file>
<file>themes/dark/notificationEdge/notificationEdge.qss</file>
<file>themes/dark/palette.ini</file>
<file>themes/dark/rejectCall/rejectCall.svg</file>
<file>themes/dark/settings/checkboxChecked.svg</file>
<file>themes/dark/settings/checkboxCheckedDisabled.svg</file>
<file>themes/dark/settings/mainHead.css</file>
<file>themes/dark/settings/mainHead.qss</file>
<file>themes/dark/statusButton/menu_indicator.svg</file>
<file>themes/dark/statusButton/statusButton.css</file>
<file>themes/dark/tooliconsZone/tooliconsZone.css</file>
<file>themes/dark/window/general.css</file>
<file>themes/dark/window/profile.css</file>
<file>themes/dark/window/statusPanel.css</file>
<file>themes/dark/window/window.css</file>
<file>themes/dark/statusButton/statusButton.qss</file>
<file>themes/dark/tooliconsZone/tooliconsZone.qss</file>
<file>themes/dark/window/general.qss</file>
<file>themes/dark/window/profile.qss</file>
<file>themes/dark/window/statusPanel.qss</file>
<file>themes/dark/window/window.qss</file>
<file>themes/default/acceptCall/acceptCall.svg</file>
<file>themes/default/addFriendForm/toxId.css</file>
<file>themes/default/chatArea/chatArea.css</file>
<file>themes/default/chatArea/chatHead.css</file>
<file>themes/default/addFriendForm/toxId.qss</file>
<file>themes/default/chatArea/chatArea.qss</file>
<file>themes/default/chatArea/chatHead.qss</file>
<file>themes/default/chatArea/error.svg</file>
<file>themes/default/chatArea/info.svg</file>
<file>themes/default/chatArea/innerStyle.css</file>
<file>themes/default/chatArea/innerStyle.qss</file>
<file>themes/default/chatArea/scrollBarDownArrow.svg</file>
<file>themes/default/chatArea/scrollBarLeftArrow.svg</file>
<file>themes/default/chatArea/scrollBarRightArrow.svg</file>
<file>themes/default/chatArea/scrollBarUpArrow.svg</file>
<file>themes/default/chatArea/spinner.svg</file>
<file>themes/default/chatArea/typing.svg</file>
<file>themes/default/chatForm/buttons.css</file>
<file>themes/default/chatForm/buttons.qss</file>
<file>themes/default/chatForm/callButton.svg</file>
<file>themes/default/chatForm/emoteButton.svg</file>
<file>themes/default/chatForm/exitFullScreenButton.svg</file>
<file>themes/default/chatForm/fileButton.svg</file>
<file>themes/default/chatForm/fullScreenButtons.css</file>
<file>themes/default/chatForm/labels.css</file>
<file>themes/default/chatForm/fullScreenButtons.qss</file>
<file>themes/default/chatForm/labels.qss</file>
<file>themes/default/chatForm/micButton.svg</file>
<file>themes/default/chatForm/micButtonRed.svg</file>
<file>themes/default/chatForm/screenshotButton.svg</file>
Expand All @@ -151,37 +151,37 @@
<file>themes/default/chatForm/videoPreviewRed.svg</file>
<file>themes/default/chatForm/volButton.svg</file>
<file>themes/default/chatForm/volButtonRed.svg</file>
<file>themes/default/contentDialog/contentDialog.css</file>
<file>themes/default/contentDialog/contentDialog.qss</file>
<file>themes/default/emoticonWidget/dot_page_current.svg</file>
<file>themes/default/emoticonWidget/dot_page_hover.svg</file>
<file>themes/default/emoticonWidget/dot_page.svg</file>
<file>themes/default/emoticonWidget/emoticonWidget.css</file>
<file>themes/default/emoticonWidget/emoticonWidget.qss</file>
<file>themes/default/fileTransferInstance/arrow_black.svg</file>
<file>themes/default/fileTransferInstance/arrow_white.svg</file>
<file>themes/default/fileTransferInstance/browse.svg</file>
<file>themes/default/fileTransferInstance/dir.svg</file>
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
<file>themes/default/fileTransferInstance/filetransferWidget.qss</file>
<file>themes/default/fileTransferInstance/no_dark.svg</file>
<file>themes/default/fileTransferInstance/no.svg</file>
<file>themes/default/fileTransferInstance/pause_dark.svg</file>
<file>themes/default/fileTransferInstance/pause.svg</file>
<file>themes/default/fileTransferInstance/yes.svg</file>
<file>themes/default/fileTransferWidget/fileDone.svg</file>
<file>themes/default/friendList/friendList.css</file>
<file>themes/default/genericChatForm/genericChatForm.css</file>
<file>themes/default/genericChatRoomWidget/genericChatRoomWidget.css</file>
<file>themes/default/loginScreen/loginScreen.css</file>
<file>themes/default/msgEdit/msgEdit.css</file>
<file>themes/default/notificationEdge/notificationEdge.css</file>
<file>themes/default/friendList/friendList.qss</file>
<file>themes/default/genericChatForm/genericChatForm.qss</file>
<file>themes/default/genericChatRoomWidget/genericChatRoomWidget.qss</file>
<file>themes/default/loginScreen/loginScreen.qss</file>
<file>themes/default/msgEdit/msgEdit.qss</file>
<file>themes/default/notificationEdge/notificationEdge.qss</file>
<file>themes/default/palette.ini</file>
<file>themes/default/rejectCall/rejectCall.svg</file>
<file>themes/default/settings/mainHead.css</file>
<file>themes/default/settings/mainHead.qss</file>
<file>themes/default/statusButton/menu_indicator.svg</file>
<file>themes/default/statusButton/statusButton.css</file>
<file>themes/default/tooliconsZone/tooliconsZone.css</file>
<file>themes/default/window/general.css</file>
<file>themes/default/window/profile.css</file>
<file>themes/default/window/statusPanel.css</file>
<file>themes/default/window/window.css</file>
<file>themes/default/statusButton/statusButton.qss</file>
<file>themes/default/tooliconsZone/tooliconsZone.qss</file>
<file>themes/default/window/general.qss</file>
<file>themes/default/window/profile.qss</file>
<file>themes/default/window/statusPanel.qss</file>
<file>themes/default/window/window.qss</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion src/chatlog/chatwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ void ChatWidget::fontChanged(const QFont& font)

void ChatWidget::reloadTheme()
{
setStyleSheet(style.getStylesheet("chatArea/chatArea.css", settings));
setStyleSheet(style.getStylesheet("chatArea/chatArea.qss", settings));
setBackgroundBrush(QBrush(style.getColor(Style::ColorPalette::GroundBase), Qt::SolidPattern));
selectionRectColor = style.getColor(Style::ColorPalette::SelectText);
selGraphItem->setBrush(QBrush(selectionRectColor));
Expand Down
2 changes: 1 addition & 1 deletion src/chatlog/content/filetransferwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void FileTransferWidget::setBackgroundColor(const QColor& c, bool whiteFont)

setProperty("fontColor", whiteFont ? "white" : "black");

setStyleSheet(style.getStylesheet("fileTransferInstance/filetransferWidget.css", settings));
setStyleSheet(style.getStylesheet("fileTransferInstance/filetransferWidget.qss", settings));
Style::repolish(this);

update();
Expand Down
4 changes: 2 additions & 2 deletions src/chatlog/content/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Text::Text(DocumentCache& documentCache_, Settings& settings_, Style& style_, co
, customColor(custom)
, documentCache(documentCache_)
, settings{settings_}
, defStyleSheet(style_.getStylesheet(QStringLiteral("chatArea/innerStyle.css"), settings_, font))
, defStyleSheet(style_.getStylesheet(QStringLiteral("chatArea/innerStyle.qss"), settings_, font))
, style{style_}
{
color = textColor();
Expand Down Expand Up @@ -246,7 +246,7 @@ void Text::visibilityChanged(bool visible)

void Text::reloadTheme()
{
defStyleSheet = style.getStylesheet(QStringLiteral("chatArea/innerStyle.css"), settings, defFont);
defStyleSheet = style.getStylesheet(QStringLiteral("chatArea/innerStyle.qss"), settings, defFont);
color = textColor();
dirty = true;
regenerate();
Expand Down
2 changes: 1 addition & 1 deletion src/video/netcamview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const auto BTN_STATE_NONE = QVariant("none");
const auto BTN_STATE_RED = QVariant("red");
const int BTN_PANEL_HEIGHT = 55;
const int BTN_PANEL_WIDTH = 250;
const auto BTN_STYLE_SHEET_PATH = QStringLiteral("chatForm/fullScreenButtons.css");
const auto BTN_STYLE_SHEET_PATH = QStringLiteral("chatForm/fullScreenButtons.qss");
} // namespace

NetCamView::NetCamView(ToxPk friendPk_, CameraSource& cameraSource_, Settings& settings_,
Expand Down
2 changes: 1 addition & 1 deletion src/widget/about/aboutfriendform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void AboutFriendForm::onAutoAcceptDirClicked()

void AboutFriendForm::reloadTheme()
{
setStyleSheet(style.getStylesheet("window/general.css", settings));
setStyleSheet(style.getStylesheet("window/general.qss", settings));
}

void AboutFriendForm::onAutoAcceptDirChanged(const QString& path)
Expand Down
4 changes: 2 additions & 2 deletions src/widget/chatformheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const short HEAD_LAYOUT_SPACING = 5;
const short MIC_BUTTONS_LAYOUT_SPACING = 4;
const short BUTTONS_LAYOUT_HOR_SPACING = 4;

const QString STYLE_PATH = QStringLiteral("chatForm/buttons.css");
const QString STYLE_PATH = QStringLiteral("chatForm/buttons.qss");

const QString STATE_NAME[] = {
QString{}, //
Expand Down Expand Up @@ -281,7 +281,7 @@ QSize ChatFormHeader::getAvatarSize() const

void ChatFormHeader::reloadTheme()
{
setStyleSheet(style.getStylesheet("chatArea/chatHead.css", settings));
setStyleSheet(style.getStylesheet("chatArea/chatHead.qss", settings));
callButton->setStyleSheet(style.getStylesheet(STYLE_PATH, settings));
videoButton->setStyleSheet(style.getStylesheet(STYLE_PATH, settings));
volButton->setStyleSheet(style.getStylesheet(STYLE_PATH, settings));
Expand Down
4 changes: 2 additions & 2 deletions src/widget/contentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,8 @@ void ContentDialog::setUsername(const QString& newName)

void ContentDialog::reloadTheme()
{
setStyleSheet(style.getStylesheet("contentDialog/contentDialog.css", settings));
friendScroll->setStyleSheet(style.getStylesheet("friendList/friendList.css", settings));
setStyleSheet(style.getStylesheet("contentDialog/contentDialog.qss", settings));
friendScroll->setStyleSheet(style.getStylesheet("friendList/friendList.qss", settings));
}

bool ContentDialog::event(QEvent* event)
Expand Down
4 changes: 2 additions & 2 deletions src/widget/contentlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ ContentLayout::~ContentLayout()
void ContentLayout::reloadTheme()
{
#ifndef Q_OS_MAC
mainHead->setStyleSheet(style.getStylesheet("settings/mainHead.css", settings));
mainContent->setStyleSheet(style.getStylesheet("window/general.css", settings));
mainHead->setStyleSheet(style.getStylesheet("settings/mainHead.qss", settings));
mainContent->setStyleSheet(style.getStylesheet("window/general.qss", settings));
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion src/widget/emoticonswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ EmoticonsWidget::EmoticonsWidget(SmileyPack& smileyPack, Settings& settings, Sty
QWidget* parent)
: QMenu(parent)
{
setStyleSheet(style.getStylesheet("emoticonWidget/emoticonWidget.css", settings));
setStyleSheet(style.getStylesheet("emoticonWidget/emoticonWidget.qss", settings));
setLayout(&layout);
layout.addWidget(&stack);

Expand Down
2 changes: 1 addition & 1 deletion src/widget/form/addfriendform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void AddFriendForm::onIdChanged(const QString& id)
isValidId ? QStringLiteral("%1 (%2)") : QStringLiteral("%1 <font color='red'>(%2)</font>");
toxIdLabel.setText(labelText.arg(toxIdText, toxIdComment));
toxId.setStyleSheet(isValidOrEmpty ? QStringLiteral("")
: style.getStylesheet("addFriendForm/toxId.css", settings));
: style.getStylesheet("addFriendForm/toxId.qss", settings));
toxId.setToolTip(isValidOrEmpty ? QStringLiteral("") : tr("Invalid Tox ID format"));

sendButton.setEnabled(isValidId);
Expand Down
2 changes: 1 addition & 1 deletion src/widget/form/conferenceform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const auto LABEL_PEER_TYPE_OUR = QVariant(QStringLiteral("our"));
const auto LABEL_PEER_TYPE_MUTED = QVariant(QStringLiteral("muted"));
const auto LABEL_PEER_PLAYING_AUDIO = QVariant(QStringLiteral("true"));
const auto LABEL_PEER_NOT_PLAYING_AUDIO = QVariant(QStringLiteral("false"));
const auto PEER_LABEL_STYLE_SHEET_PATH = QStringLiteral("chatArea/chatHead.css");
const auto PEER_LABEL_STYLE_SHEET_PATH = QStringLiteral("chatArea/chatHead.qss");

/**
* @brief Edit name for correct representation if it is needed
Expand Down
8 changes: 4 additions & 4 deletions src/widget/form/genericchatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ QString GenericChatForm::resolveToxPk(const ToxPk& pk)
}

namespace {
const QString STYLE_PATH = QStringLiteral("chatForm/buttons.css");
const QString STYLE_PATH = QStringLiteral("chatForm/buttons.qss");
}

namespace {
Expand Down Expand Up @@ -367,8 +367,8 @@ QDateTime GenericChatForm::getLatestTime() const

void GenericChatForm::reloadTheme()
{
setStyleSheet(style.getStylesheet("genericChatForm/genericChatForm.css", settings));
msgEdit->setStyleSheet(style.getStylesheet("msgEdit/msgEdit.css", settings)
setStyleSheet(style.getStylesheet("genericChatForm/genericChatForm.qss", settings));
msgEdit->setStyleSheet(style.getStylesheet("msgEdit/msgEdit.qss", settings)
+ fontToCss(settings.getChatMessageFont(), "QTextEdit"));

emoteButton->setStyleSheet(style.getStylesheet(STYLE_PATH, settings));
Expand Down Expand Up @@ -502,7 +502,7 @@ void GenericChatForm::onChatMessageFontChanged(const QFont& font)
chatWidget->fontChanged(font);
chatWidget->forceRelayout();
// message editor
msgEdit->setStyleSheet(style.getStylesheet("msgEdit/msgEdit.css", settings)
msgEdit->setStyleSheet(style.getStylesheet("msgEdit/msgEdit.qss", settings)
+ fontToCss(font, "QTextEdit"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/widget/form/profileform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ProfileForm::ProfileForm(IProfileInfo* profileInfo_, Settings& settings_, Style&
profilePicture->installEventFilter(this);
profilePicture->setAccessibleName("Profile avatar");
profilePicture->setAccessibleDescription("Set a profile avatar shown to all contacts");
profilePicture->setStyleSheet(style.getStylesheet("window/profile.css", settings));
profilePicture->setStyleSheet(style.getStylesheet("window/profile.qss", settings));
connect(profilePicture, &MaskablePixmapWidget::clicked, this, &ProfileForm::onAvatarClicked);
connect(profilePicture, &MaskablePixmapWidget::customContextMenuRequested, this,
&ProfileForm::showProfilePictureContextMenu);
Expand Down
8 changes: 4 additions & 4 deletions src/widget/form/searchsettingsform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ ParameterSearch SearchSettingsForm::getParameterSearch()
void SearchSettingsForm::reloadTheme()
{
ui->choiceDateButton->setStyleSheet(
style.getStylesheet(QStringLiteral("chatForm/buttons.css"), settings));
style.getStylesheet(QStringLiteral("chatForm/buttons.qss"), settings));
ui->startDateLabel->setStyleSheet(
style.getStylesheet(QStringLiteral("chatForm/labels.css"), settings));
style.getStylesheet(QStringLiteral("chatForm/labels.qss"), settings));
}

void SearchSettingsForm::updateStartDateLabel()
Expand All @@ -109,7 +109,7 @@ void SearchSettingsForm::onStartSearchSelected(const int index)

ui->choiceDateButton->setProperty("state", QStringLiteral("green"));
ui->choiceDateButton->setStyleSheet(
style.getStylesheet(QStringLiteral("chatForm/buttons.css"), settings));
style.getStylesheet(QStringLiteral("chatForm/buttons.qss"), settings));

if (startDate.isNull()) {
startDate = QDate::currentDate();
Expand All @@ -122,7 +122,7 @@ void SearchSettingsForm::onStartSearchSelected(const int index)

ui->choiceDateButton->setProperty("state", QString());
ui->choiceDateButton->setStyleSheet(
style.getStylesheet(QStringLiteral("chatForm/buttons.css"), settings));
style.getStylesheet(QStringLiteral("chatForm/buttons.qss"), settings));
}

setUpdate(true);
Expand Down
2 changes: 1 addition & 1 deletion src/widget/genericchatroomwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ QString GenericChatroomWidget::getTitle() const

void GenericChatroomWidget::reloadTheme()
{
setStyleSheet(style.getStylesheet("genericChatRoomWidget/genericChatRoomWidget.css", settings));
setStyleSheet(style.getStylesheet("genericChatRoomWidget/genericChatRoomWidget.qss", settings));
}

void GenericChatroomWidget::activate()
Expand Down
Loading
Loading