Skip to content

Commit

Permalink
cleanup: Rename all .css files to .qss.
Browse files Browse the repository at this point in the history
This way, editor syntax highlighting is happy. These files are not
actual CSS syntax.
  • Loading branch information
iphydf committed Nov 21, 2024
1 parent d6053ac commit 0564cd1
Show file tree
Hide file tree
Showing 74 changed files with 88 additions and 88 deletions.
92 changes: 46 additions & 46 deletions res.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@
<file>img/transfer.svg</file>
<file>themes/dark/palette.ini</file>
<file>themes/dark/fileTransferWidget/fileDone.svg</file>
<file>themes/dark/chatArea/chatArea.css</file>
<file>themes/dark/chatArea/chatHead.css</file>
<file>themes/dark/chatArea/innerStyle.css</file>
<file>themes/dark/chatArea/chatArea.qss</file>
<file>themes/dark/chatArea/chatHead.qss</file>
<file>themes/dark/chatArea/innerStyle.qss</file>
<file>themes/dark/chatArea/scrollBarUpArrow.svg</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/chatForm/buttons.css</file>
<file>themes/dark/chatForm/fullScreenButtons.css</file>
<file>themes/dark/chatForm/buttons.qss</file>
<file>themes/dark/chatForm/fullScreenButtons.qss</file>
<file>themes/dark/chatForm/callButton.svg</file>
<file>themes/dark/chatForm/labels.css</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/videoButton.svg</file>
Expand All @@ -82,19 +82,19 @@
<file>themes/dark/emoticonWidget/dot_page.svg</file>
<file>themes/dark/emoticonWidget/dot_page_current.svg</file>
<file>themes/dark/emoticonWidget/dot_page_hover.svg</file>
<file>themes/dark/emoticonWidget/emoticonWidget.css</file>
<file>themes/dark/friendList/friendList.css</file>
<file>themes/dark/genericChatRoomWidget/genericChatRoomWidget.css</file>
<file>themes/dark/msgEdit/msgEdit.css</file>
<file>themes/dark/settings/mainHead.css</file>
<file>themes/dark/emoticonWidget/emoticonWidget.qss</file>
<file>themes/dark/friendList/friendList.qss</file>
<file>themes/dark/genericChatRoomWidget/genericChatRoomWidget.qss</file>
<file>themes/dark/msgEdit/msgEdit.qss</file>
<file>themes/dark/settings/mainHead.qss</file>
<file>themes/dark/settings/checkboxChecked.svg</file>
<file>themes/dark/settings/checkboxCheckedDisabled.svg</file>
<file>themes/dark/statusButton/statusButton.css</file>
<file>themes/dark/statusButton/statusButton.qss</file>
<file>themes/dark/statusButton/menu_indicator.svg</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/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/dark/chatArea/info.svg</file>
<file>themes/dark/chatArea/spinner.svg</file>
<file>themes/dark/chatArea/typing.svg</file>
Expand All @@ -108,28 +108,28 @@
<file>themes/dark/fileTransferInstance/arrow_white.svg</file>
<file>themes/dark/fileTransferInstance/arrow_black.svg</file>
<file>themes/dark/fileTransferInstance/browse.svg</file>
<file>themes/dark/fileTransferInstance/filetransferWidget.css</file>
<file>themes/dark/genericChatForm/genericChatForm.css</file>
<file>themes/dark/fileTransferInstance/filetransferWidget.qss</file>
<file>themes/dark/genericChatForm/genericChatForm.qss</file>
<file>themes/dark/acceptCall/acceptCall.svg</file>
<file>themes/dark/addFriendForm/toxId.css</file>
<file>themes/dark/addFriendForm/toxId.qss</file>
<file>themes/dark/rejectCall/rejectCall.svg</file>
<file>themes/dark/notificationEdge/notificationEdge.css</file>
<file>themes/dark/loginScreen/loginScreen.css</file>
<file>themes/dark/contentDialog/contentDialog.css</file>
<file>themes/dark/tooliconsZone/tooliconsZone.css</file>
<file>themes/dark/notificationEdge/notificationEdge.qss</file>
<file>themes/dark/loginScreen/loginScreen.qss</file>
<file>themes/dark/contentDialog/contentDialog.qss</file>
<file>themes/dark/tooliconsZone/tooliconsZone.qss</file>
<file>themes/default/palette.ini</file>
<file>themes/default/fileTransferWidget/fileDone.svg</file>
<file>themes/default/chatArea/chatArea.css</file>
<file>themes/default/chatArea/chatHead.css</file>
<file>themes/default/chatArea/innerStyle.css</file>
<file>themes/default/chatArea/chatArea.qss</file>
<file>themes/default/chatArea/chatHead.qss</file>
<file>themes/default/chatArea/innerStyle.qss</file>
<file>themes/default/chatArea/scrollBarUpArrow.svg</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/chatForm/buttons.css</file>
<file>themes/default/chatForm/fullScreenButtons.css</file>
<file>themes/default/chatForm/buttons.qss</file>
<file>themes/default/chatForm/fullScreenButtons.qss</file>
<file>themes/default/chatForm/callButton.svg</file>
<file>themes/default/chatForm/labels.css</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/videoButton.svg</file>
Expand All @@ -151,17 +151,17 @@
<file>themes/default/emoticonWidget/dot_page.svg</file>
<file>themes/default/emoticonWidget/dot_page_current.svg</file>
<file>themes/default/emoticonWidget/dot_page_hover.svg</file>
<file>themes/default/emoticonWidget/emoticonWidget.css</file>
<file>themes/default/friendList/friendList.css</file>
<file>themes/default/genericChatRoomWidget/genericChatRoomWidget.css</file>
<file>themes/default/msgEdit/msgEdit.css</file>
<file>themes/default/settings/mainHead.css</file>
<file>themes/default/statusButton/statusButton.css</file>
<file>themes/default/emoticonWidget/emoticonWidget.qss</file>
<file>themes/default/friendList/friendList.qss</file>
<file>themes/default/genericChatRoomWidget/genericChatRoomWidget.qss</file>
<file>themes/default/msgEdit/msgEdit.qss</file>
<file>themes/default/settings/mainHead.qss</file>
<file>themes/default/statusButton/statusButton.qss</file>
<file>themes/default/statusButton/menu_indicator.svg</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/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>
<file>themes/default/chatArea/info.svg</file>
<file>themes/default/chatArea/spinner.svg</file>
<file>themes/default/chatArea/typing.svg</file>
Expand All @@ -175,17 +175,17 @@
<file>themes/default/fileTransferInstance/arrow_white.svg</file>
<file>themes/default/fileTransferInstance/arrow_black.svg</file>
<file>themes/default/fileTransferInstance/browse.svg</file>
<file>themes/default/fileTransferInstance/filetransferWidget.css</file>
<file>themes/default/genericChatForm/genericChatForm.css</file>
<file>themes/default/fileTransferInstance/filetransferWidget.qss</file>
<file>themes/default/genericChatForm/genericChatForm.qss</file>
<file>themes/default/acceptCall/acceptCall.svg</file>
<file>themes/default/addFriendForm/toxId.css</file>
<file>themes/default/addFriendForm/toxId.qss</file>
<file>themes/default/rejectCall/rejectCall.svg</file>
<file>img/login_logo.svg</file>
<file>themes/default/notificationEdge/notificationEdge.css</file>
<file>themes/default/loginScreen/loginScreen.css</file>
<file>themes/default/notificationEdge/notificationEdge.qss</file>
<file>themes/default/loginScreen/loginScreen.qss</file>
<file>img/others/logout-icon.svg</file>
<file>img/caps_lock.svg</file>
<file>themes/default/contentDialog/contentDialog.css</file>
<file>themes/default/tooliconsZone/tooliconsZone.css</file>
<file>themes/default/contentDialog/contentDialog.qss</file>
<file>themes/default/tooliconsZone/tooliconsZone.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 @@ -27,7 +27,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 @@ -290,7 +290,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 @@ -429,8 +429,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 @@ -59,8 +59,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 @@ -364,8 +364,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 @@ -499,7 +499,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
2 changes: 1 addition & 1 deletion src/widget/loginscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ LoginScreen::LoginScreen(Settings& settings_, Style& style, const QString& initi
connect(ui->importButton, &QPushButton::clicked, this, &LoginScreen::onImportProfile);

reset(initialProfileName);
setStyleSheet(style.getStylesheet("loginScreen/loginScreen.css", settings));
setStyleSheet(style.getStylesheet("loginScreen/loginScreen.qss", settings));

retranslateUi();
Translator::registerHandler(std::bind(&LoginScreen::retranslateUi, this), this);
Expand Down
2 changes: 1 addition & 1 deletion src/widget/notificationedgewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NotificationEdgeWidget::NotificationEdgeWidget(Position position, Settings& sett
: QWidget(parent)
{
setAttribute(Qt::WA_StyledBackground); // Show background.
setStyleSheet(style.getStylesheet("notificationEdge/notificationEdge.css", settings));
setStyleSheet(style.getStylesheet("notificationEdge/notificationEdge.qss", settings));
QHBoxLayout* layout = new QHBoxLayout(this);
layout->addStretch();

Expand Down
Loading

0 comments on commit 0564cd1

Please sign in to comment.