Merge pull request #2184 from defnax/ui-fix-6

UI fixes
This commit is contained in:
defnax 2020-12-28 12:35:19 +01:00 committed by GitHub
commit b4cbf2691f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 38 additions and 16 deletions

View File

@ -696,7 +696,7 @@ void ChatLobbyDialog::participantsTreeWidgetDoubleClicked(QTreeWidgetItem *item,
if(column == COLUMN_NAME)
{
getChatWidget()->pasteText("@" + RsHtml::plainText(item->text(COLUMN_NAME))) ;
getChatWidget()->pasteText("@" + RsHtml::plainText(item->text(COLUMN_NAME)) + " ") ;
return ;
}

View File

@ -1842,13 +1842,16 @@ void ChatWidget::updateTitle()
ui->titleLabel->setText(RsHtml::plainText(name) + "@" + RsHtml::plainText(title));
}
void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const QString& /*status_string*/)
void ChatWidget::updatePeersCustomStateString(const QString& peer_id, const QString& status_string)
{
if (chatType() != CHATTYPE_PRIVATE )
{
return;
}
QString status_text;
// TODO: fix peer_id and types and eveyrhing
/*
if (RsPeerId(peer_id.toStdString()) == peerId) {
if (RsPeerId(peer_id.toStdString()) == chatId.toPeerId()) {
// the peers status string has changed
if (status_string.isEmpty()) {
ui->statusMessageLabel->hide();
@ -1863,7 +1866,6 @@ void ChatWidget::updatePeersCustomStateString(const QString& /*peer_id*/, const
ui->statusLabel->setAlignment ( Qt::AlignVCenter );
}
}
*/
}
void ChatWidget::updateStatusString(const QString &statusMask, const QString &statusString, bool permanent)

View File

@ -12,16 +12,16 @@
</property>
<layout class="QGridLayout">
<property name="leftMargin">
<number>0</number>
<number>1</number>
</property>
<property name="topMargin">
<number>0</number>
<number>1</number>
</property>
<property name="rightMargin">
<number>0</number>
<number>1</number>
</property>
<property name="bottomMargin">
<number>0</number>
<number>1</number>
</property>
<item row="2" column="0">
<widget class="QFrame" name="frame">

View File

@ -92,7 +92,7 @@ void ImHistoryBrowserCreateItemsThread::run()
/** Default constructor */
ImHistoryBrowser::ImHistoryBrowser(const ChatId &chatId, QTextEdit *edit,const QString &chatTitle, QWidget *parent)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint)
: QDialog(parent, Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint)
{
/* Invoke Qt Designer generated QObject setup routine */
ui.setupUi(this);

View File

@ -1109,3 +1109,7 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
border-radius: 6px;
background: white;
}
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{
font-size: 10pt;
}

View File

@ -41,8 +41,6 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
ui.unit_CB->addItem(tr("KB/s")) ;
ui.unit_CB->addItem(tr("Count")) ;
ui.logScale_CB->setChecked(true) ;
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ;
ui.bwgraph_BW->setSelector(BWGraphSource::SELECTOR_TYPE_SERVICE,BWGraphSource::GRAPH_TYPE_SUM) ;

View File

@ -192,7 +192,7 @@ BwCtrlWindow::BwCtrlWindow(QWidget *parent)
/* Set header resize modes and initial section sizes Peer TreeView*/
QHeaderView * _header = bwTreeWidget->header () ;
// _header->resizeSection ( COLUMN_RSNAME, 170*fact );
QHeaderView_setSectionResizeMode(_header, QHeaderView::ResizeToContents);
QHeaderView_setSectionResizeMode(_header, QHeaderView::Interactive);
}
BwCtrlWindow::~BwCtrlWindow()

View File

@ -109,7 +109,7 @@ void DhtWindow::updateDisplay()
RsAutoUpdatePage::unlockAllEvents() ;
QHeaderView_setSectionResizeMode(ui.peerTreeWidget->header(), QHeaderView::ResizeToContents);
//QHeaderView_setSectionResizeMode(ui.peerTreeWidget->header(), QHeaderView::ResizeToContents);
QHeaderView_setSectionResizeMode(ui.dhtTreeWidget->header(), QHeaderView::ResizeToContents);
QHeaderView_setSectionResizeMode(ui.relayTreeWidget->header(), QHeaderView::ResizeToContents);
}

View File

@ -203,6 +203,8 @@ void GlobalRouterStatistics::updateContent()
item -> setData(COL_DUPLICATION_FACTOR, Qt::DisplayRole, QString::number(cache_infos[i].duplication_factor));
item -> setData(COL_RECEIVEDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].routing_time));
item -> setData(COL_SENDTIME, Qt::DisplayRole, QString::number(now - cache_infos[i].last_sent_time));
item->setTextAlignment(COL_DATASIZE, Qt::AlignRight );
}
}

View File

@ -2277,3 +2277,11 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
MainWindow QListWidget {
font-size: 12pt;
}
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{
font-size: 10pt;
}
NewFriendList QTreeView#peerTreeWidget {
font-size: 12pt;
}

View File

@ -1498,3 +1498,11 @@ PulseTopLevel QFrame#frame, PulseViewGroup QFrame#frame, PulseReply QFrame#frame
MainWindow QListWidget {
font-size: 12pt;
}
ChatLobbyWidget QTreeWidget#lobbyTreeWidget{
font-size: 10pt;
}
NewFriendList QTreeView#peerTreeWidget {
font-size: 12pt;
}

View File

@ -305,7 +305,7 @@ QPixmap misc::getOpenThumbnailedPicture(QWidget *parent, const QString &caption,
{
// Let the user choose an picture file
QString fileName;
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.jpeg *.xpm *.jpg *.tiff *.gif)"), fileName))
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.jpeg *.xpm *.jpg *.tiff *.gif *.webp)"), fileName))
return QPixmap();
if(width > 0 && height > 0)