From 1ecdec7a5e51c03586a300ec6dc45039df71a00d Mon Sep 17 00:00:00 2001 From: Mohammed Nafees Date: Fri, 4 Apr 2014 19:52:37 +0530 Subject: [PATCH] Minor changes. Added a sweet tooltip :) --- interface/interface_en.ts | 30 +++++++++++------------ interface/src/ui/RunningScriptsWidget.cpp | 10 ++++---- interface/src/ui/ScriptsTableWidget.cpp | 8 +++--- interface/ui/runningScriptsWidget.ui | 25 +++++++++++++------ 4 files changed, 42 insertions(+), 31 deletions(-) diff --git a/interface/interface_en.ts b/interface/interface_en.ts index 16de312c33..5256944949 100644 --- a/interface/interface_en.ts +++ b/interface/interface_en.ts @@ -162,51 +162,51 @@ RunningScriptsWidget - + Form - - + + <html><head/><body><p><span style=" font-size:18pt;">Running Scripts</span></p></body></html> - - + + <html><head/><body><p><span style=" font-weight:600;">Currently running</span></p></body></html> - - + + Reload all Reload All - - + + Stop all Stop All - - + + <html><head/><body><p><span style=" font-weight:600;">Recently loaded</span></p></body></html> - - + + (click a script or use the 1-9 keys to load and run it) - - + + There are no scripts currently running. diff --git a/interface/src/ui/RunningScriptsWidget.cpp b/interface/src/ui/RunningScriptsWidget.cpp index a684fb4594..f27ea9a831 100644 --- a/interface/src/ui/RunningScriptsWidget.cpp +++ b/interface/src/ui/RunningScriptsWidget.cpp @@ -143,18 +143,18 @@ void RunningScriptsWidget::keyPressEvent(QKeyEvent *e) void RunningScriptsWidget::paintEvent(QPaintEvent *) { QPainter painter(this); - painter.setPen(QColor::fromRgb(196, 196, 196)); + painter.setPen(QColor::fromRgb(225, 225, 225)); if (ui->currentlyRunningLabel->isVisible()) { // line below the 'Currently Running' label - painter.drawLine(20, ui->currentlyRunningLabel->y() + ui->currentlyRunningLabel->height(), - width() - 21, ui->currentlyRunningLabel->y() + ui->currentlyRunningLabel->height()); + painter.drawLine(21, ui->currentlyRunningLabel->y() + ui->currentlyRunningLabel->height(), + width() - 22, ui->currentlyRunningLabel->y() + ui->currentlyRunningLabel->height()); } if (ui->recentlyLoadedLabel->isVisible()) { // line below the 'Recently loaded' label - painter.drawLine(20, ui->recentlyLoadedLabel->y() + ui->recentlyLoadedLabel->height(), - width() - 21, ui->recentlyLoadedLabel->y() + ui->recentlyLoadedLabel->height()); + painter.drawLine(21, ui->recentlyLoadedLabel->y() + ui->recentlyLoadedLabel->height(), + width() - 22, ui->recentlyLoadedLabel->y() + ui->recentlyLoadedLabel->height()); } painter.end(); diff --git a/interface/src/ui/ScriptsTableWidget.cpp b/interface/src/ui/ScriptsTableWidget.cpp index af67b939eb..ac4dc88fee 100644 --- a/interface/src/ui/ScriptsTableWidget.cpp +++ b/interface/src/ui/ScriptsTableWidget.cpp @@ -19,18 +19,20 @@ ScriptsTableWidget::ScriptsTableWidget(QWidget *parent) : setShowGrid(false); setSelectionMode(QAbstractItemView::NoSelection); setEditTriggers(QAbstractItemView::NoEditTriggers); - setStyleSheet("background: transparent;"); + setStyleSheet("QTableWidget { background: transparent; color: #333333; } QToolTip { color: #000000; background: #fdeba5; padding: 2px; }"); + setToolTipDuration(200); + setWordWrap(true); setGeometry(0, 0, parent->width(), parent->height()); } void ScriptsTableWidget::paintEvent(QPaintEvent *event) { QPainter painter(viewport()); - painter.setPen(QColor::fromRgb(196, 196, 196)); + painter.setPen(QColor::fromRgb(225, 225, 225)); int y = 0; for (int i = 0; i < rowCount(); ++i) { - painter.drawLine(0, rowHeight(i) + y, width(), rowHeight(i) + y); + painter.drawLine(6, rowHeight(i) + y, width(), rowHeight(i) + y); y += rowHeight(i); } painter.end(); diff --git a/interface/ui/runningScriptsWidget.ui b/interface/ui/runningScriptsWidget.ui index 7353c19508..f81f30537b 100644 --- a/interface/ui/runningScriptsWidget.ui +++ b/interface/ui/runningScriptsWidget.ui @@ -14,15 +14,19 @@ Form - background: #f7f7f7; -font-family: Helvetica, Arial, "DejaVu Sans"; + * { + font-family: Helvetica, Arial, sans-serif; +} +QWidget { + background: #f7f7f7; +} 20 10 - 221 + 251 31 @@ -33,6 +37,12 @@ font-size: 20pt; <html><head/><body><p><span style=" font-size:18pt;">Running Scripts</span></p></body></html> + + 0 + + + -1 + @@ -45,7 +55,7 @@ font-size: 20pt; color: #0e7077; -font-size: 14pt; +font: bold 14pt; <html><head/><body><p><span style=" font-weight:600;">Currently running</span></p></body></html> @@ -70,7 +80,7 @@ font-size: 14pt; background: #0e7077; color: #fff; border-radius: 4px; -font: 14pt 75pt; +font: bold 14pt; Reload all @@ -96,7 +106,7 @@ font: 14pt 75pt; background: #0e7077; color: #fff; border-radius: 4px; -font: 14pt 75pt; +font: bold 14pt; Stop all @@ -117,7 +127,7 @@ font: 14pt 75pt; color: #0e7077; -font-size: 14pt; +font: bold 14pt; <html><head/><body><p><span style=" font-weight:600;">Recently loaded</span></p></body></html> @@ -204,7 +214,6 @@ font-size: 14pt; background: transparent; font-size: 14pt; - reloadAllButton