mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 14:10:54 -04:00
Fixed hardcoded background color
This commit is contained in:
parent
ddb4300a60
commit
7fced6a197
2 changed files with 18 additions and 4 deletions
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "RSPermissionMatrixWidget.h"
|
#include "RSPermissionMatrixWidget.h"
|
||||||
#include "gui/settings/ServicePermissionsPage.h"
|
#include "gui/settings/ServicePermissionsPage.h"
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include <retroshare/rsstatus.h>
|
#include <retroshare/rsstatus.h>
|
||||||
#include <retroshare/rspeers.h>
|
#include <retroshare/rspeers.h>
|
||||||
#include <retroshare/rsservicecontrol.h>
|
#include <retroshare/rsservicecontrol.h>
|
||||||
|
@ -246,7 +247,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||||
_painter->setRenderHint(QPainter::TextAntialiasing);
|
_painter->setRenderHint(QPainter::TextAntialiasing);
|
||||||
|
|
||||||
/* Fill in the background */
|
/* Fill in the background */
|
||||||
_painter->fillRect(_rec, QBrush(BACK_COLOR));
|
//_painter->fillRect(_rec, QBrush(BACK_COLOR));
|
||||||
_painter->drawRect(_rec);
|
_painter->drawRect(_rec);
|
||||||
|
|
||||||
// draw one line per friend.
|
// draw one line per friend.
|
||||||
|
@ -306,7 +307,11 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||||
|
|
||||||
QPen pen ;
|
QPen pen ;
|
||||||
pen.setWidth(2) ;
|
pen.setWidth(2) ;
|
||||||
|
if (Settings->getSheetName() == ":Standard_Dark"){
|
||||||
|
pen.setBrush(FOREGROUND_COLORDARK) ;
|
||||||
|
} else {
|
||||||
pen.setBrush(FOREGROUND_COLOR) ;
|
pen.setBrush(FOREGROUND_COLOR) ;
|
||||||
|
}
|
||||||
|
|
||||||
_painter->setPen(pen) ;
|
_painter->setPen(pen) ;
|
||||||
int i=0;
|
int i=0;
|
||||||
|
@ -371,7 +376,11 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||||
_painter->drawLine(QPointF(X,Y+3),QPointF(X+text_width,Y+3)) ;
|
_painter->drawLine(QPointF(X,Y+3),QPointF(X+text_width,Y+3)) ;
|
||||||
_painter->drawLine(QPointF(X+text_width/2, Y+3), QPointF(X+text_width/2,S*fMATRIX_START_Y+peer_ids.size()*S*fROW_SIZE - S*fROW_SIZE+5)) ;
|
_painter->drawLine(QPointF(X+text_width/2, Y+3), QPointF(X+text_width/2,S*fMATRIX_START_Y+peer_ids.size()*S*fROW_SIZE - S*fROW_SIZE+5)) ;
|
||||||
|
|
||||||
|
if (Settings->getSheetName() == ":Standard_Dark"){
|
||||||
|
pen.setBrush(FOREGROUND_COLORDARK) ;
|
||||||
|
} else {
|
||||||
pen.setBrush(FOREGROUND_COLOR) ;
|
pen.setBrush(FOREGROUND_COLOR) ;
|
||||||
|
}
|
||||||
_painter->setPen(pen) ;
|
_painter->setPen(pen) ;
|
||||||
|
|
||||||
_painter->drawText(QPointF(X,Y),name);
|
_painter->drawText(QPointF(X,Y),name);
|
||||||
|
@ -553,7 +562,11 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||||
brush.setStyle(Qt::SolidPattern) ;
|
brush.setStyle(Qt::SolidPattern) ;
|
||||||
QPen pen ;
|
QPen pen ;
|
||||||
pen.setWidth(1) ;
|
pen.setWidth(1) ;
|
||||||
|
if (Settings->getSheetName() == ":Standard_Dark"){
|
||||||
|
pen.setBrush(FOREGROUND_COLORDARK) ;
|
||||||
|
} else {
|
||||||
pen.setBrush(FOREGROUND_COLOR) ;
|
pen.setBrush(FOREGROUND_COLOR) ;
|
||||||
|
}
|
||||||
_painter->setPen(pen) ;
|
_painter->setPen(pen) ;
|
||||||
QRect position = computeNodePosition(0,i,false) ;
|
QRect position = computeNodePosition(0,i,false) ;
|
||||||
int popup_x = position.x() + (50 * S / 14.0);
|
int popup_x = position.x() + (50 * S / 14.0);
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#define BACK_COLOR Qt::white
|
#define BACK_COLOR Qt::white
|
||||||
#define FOREGROUND_COLOR Qt::black
|
#define FOREGROUND_COLOR Qt::black
|
||||||
|
#define FOREGROUND_COLORDARK Qt::gray
|
||||||
#define SCALE_COLOR Qt::black
|
#define SCALE_COLOR Qt::black
|
||||||
#define GRID_COLOR Qt::lightGray
|
#define GRID_COLOR Qt::lightGray
|
||||||
#define RSDHT_COLOR Qt::magenta
|
#define RSDHT_COLOR Qt::magenta
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue