mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-03 11:00:14 -05:00
fixed styles loading in chat. Added missing history/compact/colored style
This commit is contained in:
parent
d053400914
commit
1e1fe7708f
@ -578,7 +578,10 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
|
||||
{
|
||||
variants.clear();
|
||||
|
||||
std::cerr << "Getting variants for style: \"" << stylePath.toStdString() << "\"" << std::endl;
|
||||
|
||||
if (stylePath.isEmpty()) {
|
||||
std::cerr << "empty!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -586,11 +589,13 @@ static bool getStyleInfo(QString stylePath, QString stylePathRelative, ChatStyle
|
||||
QDir dir(QApplication::applicationDirPath());
|
||||
if (dir.cd(stylePath) == false) {
|
||||
// style not found
|
||||
std::cerr << "no path!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dir.cd("variants") == false) {
|
||||
// no variants available
|
||||
std::cerr << "no variants!" << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -621,6 +621,7 @@
|
||||
<file>qss/chat/compact/history/system.htm</file>
|
||||
<file>qss/chat/compact/history/main.css</file>
|
||||
<file>qss/chat/compact/history/variants/Standard.css</file>
|
||||
<file>qss/chat/compact/history/variants/Colored.css</file>
|
||||
<file>qss/stylesheet/qss.default</file>
|
||||
<file>qss/stylesheet/Standard.qss</file>
|
||||
<file>images/connect/connectFriendWatermark.png</file>
|
||||
|
@ -0,0 +1,19 @@
|
||||
.incomingName {
|
||||
color:%color%;
|
||||
}
|
||||
|
||||
.outgoingName {
|
||||
color:%color%;
|
||||
}
|
||||
|
||||
.hincomingName {
|
||||
color:%color%;
|
||||
}
|
||||
|
||||
.houtgoingName {
|
||||
color:%color%;
|
||||
}
|
||||
|
||||
.ooutgoingName {
|
||||
color:%color%;
|
||||
}
|
@ -30,7 +30,6 @@
|
||||
#include <retroshare/rspeers.h>
|
||||
#include "ChatPage.h"
|
||||
#include <gui/RetroShareLink.h>
|
||||
#include "gui/chat/ChatStyle.h"
|
||||
#include "gui/chat/ChatDialog.h"
|
||||
#include "gui/notifyqt.h"
|
||||
#include "rsharesettings.h"
|
||||
@ -46,7 +45,7 @@
|
||||
#define IMAGE_CHAT_DELETE ":/images/deletemail24.png"
|
||||
#define IMAGE_CHAT_COPY ":/images/copyrslink.png"
|
||||
|
||||
static QString loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_CB, QComboBox *comboBox, QString &styleVariant)
|
||||
QString ChatPage::loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_CB, QComboBox *comboBox, QString &styleVariant)
|
||||
{
|
||||
QList<ChatStyleInfo> styles;
|
||||
QList<ChatStyleInfo>::iterator style;
|
||||
@ -87,6 +86,15 @@ static QString loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_CB,
|
||||
|
||||
whileBlocking(style_CB)->setCurrentIndex(activeItem);
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case ChatStyle::TYPE_PUBLIC: on_publicList_currentRowChanged(activeItem); break ;
|
||||
case ChatStyle::TYPE_PRIVATE: on_privateList_currentRowChanged(activeItem); break ;
|
||||
case ChatStyle::TYPE_HISTORY: on_historyList_currentRowChanged(activeItem); break ;
|
||||
default:
|
||||
break ;
|
||||
}
|
||||
|
||||
/* now the combobox should be filled */
|
||||
|
||||
int index = comboBox->findText(styleVariant);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#define _CHATPAGE_H
|
||||
|
||||
#include <retroshare-gui/configpage.h>
|
||||
#include "gui/chat/ChatStyle.h"
|
||||
#include "ui_ChatPage.h"
|
||||
|
||||
class ChatPage : public ConfigPage
|
||||
@ -71,6 +72,7 @@ class ChatPage : public ConfigPage
|
||||
private:
|
||||
void setPreviewMessages(QString &stylePath, QString styleVariant, QTextBrowser *textBrowser);
|
||||
void fillPreview(QComboBox *listWidget, QComboBox *comboBox, QTextBrowser *textBrowser);
|
||||
QString loadStyleInfo(ChatStyle::enumStyleType type, QComboBox *style_CB, QComboBox *comboBox, QString &styleVariant);
|
||||
|
||||
QFont fontTempChat;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<item row="3" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="general">
|
||||
<attribute name="title">
|
||||
|
Loading…
x
Reference in New Issue
Block a user