Skip to content

Commit

Permalink
GUI - Try again to remove borders
Browse files Browse the repository at this point in the history
* Combo of Joseph's frame removal hack and my
  recent style tweaks.

* Doesn't seem to have dodgy tab behaviour...
  • Loading branch information
samaaron committed Jul 29, 2015
1 parent f28a5d5 commit 4f6a67c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions app/gui/qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ void MainWindow::updateDarkMode(){
QString widgetTitleStyling = QString("QDockWidget::title{color: %3; border-bottom: 1px solid %2; text-align: center; background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 %1, stop: 1.0 #1c2529); font-size 10px;} QDockWidget{font-size:10px;} ").arg(windowColor, windowBorder, windowForegroundColor);
QString toolTipStyling = QString("QToolTip {color: #ffffff; background-color: #929292; border: 0px;} ");

this->setStyleSheet(QString(buttonStyling + splitterStyling+ toolTipStyling+scrollStyling + "QSlider::groove:vertical{margin: 2px 0; background: dodgerblue; border-radius: 3px;} QSlider::handle:vertical {border: 1px solid #222; border-radius: 3px; height: 30px; background: #333;} QMenu{background: #929292; color: #000; } QMenu:selected{background: deeppink;} QMainWindow::separator{border: 1px solid %1;} QMainWindow{background-color: %1; color: white;} QFrame{border: 0px;}").arg(windowColor));
this->setStyleSheet(QString(buttonStyling + splitterStyling+ toolTipStyling+scrollStyling + "QSlider::groove:vertical{margin: 2px 0; background: dodgerblue; border-radius: 3px;} QSlider::handle:vertical {border: 1px solid #222; border-radius: 3px; height: 30px; background: #333;} QMenu{background: #929292; color: #000; } QMenu:selected{background: deeppink;} QMainWindow::separator{border: 1px solid %1;} QMainWindow{background-color: %1; color: white;}").arg(windowColor));
statusBar()->setStyleSheet( QString("QStatusBar{background-color: %1; border-top: 1px solid %2;}").arg(windowColor, windowBorder));
outputPane->setStyleSheet( QString("QTextEdit{background-color: %1; color: %2; border: 0px;}").arg(paneColor, windowForegroundColor));
outputWidget->setStyleSheet(widgetTitleStyling);
Expand All @@ -1440,6 +1440,11 @@ void MainWindow::updateDarkMode(){
toolBar->setStyleSheet( QString("QToolBar{background-color: %1; border-bottom: 1px solid %2;}").arg(windowColor,windowBorder));
errorPane->setStyleSheet( QString("QTextEdit{background-color: %1;} .error-background{background-color: %2} ").arg(paneColor, currentTheme->color("ErrorBackground").name()));

for(int i=0; i < tabs->count(); i++){
SonicPiScintilla *ws = (SonicPiScintilla *)tabs->widget(i);
ws->setFrameShape(QFrame::NoFrame);
}

foreach(QTextBrowser* pane, infoPanes) {
pane->setStyleSheet(QString(scrollStyling + "QTextBrowser{ padding-left:10; padding-top:10; padding-bottom:10; padding-right:10;}"));
}
Expand Down Expand Up @@ -1508,9 +1513,7 @@ void MainWindow::updateDarkMode(){

QApplication::setPalette(p);

///start orig

this->setStyleSheet(QString(l_buttonStyling + l_splitterStyling+ l_toolTipStyling+l_scrollStyling + "QSlider::groove:vertical{margin: 2px 0; background: dodgerblue; border-radius: 3px;} QSlider::handle:vertical {border: 1px solid #222; border-radius: 3px; height: 30px; background: #333;} QMenu{background: #929292; color: #000; } QMenu:selected{background: deeppink;} QMainWindow::separator{border: 1px solid %1;} QMainWindow{background-color: %1; color: %1;} QFrame{border: 0px;}").arg(l_windowColor));
this->setStyleSheet(QString(l_buttonStyling + l_splitterStyling+ l_toolTipStyling+l_scrollStyling + "QSlider::groove:vertical{margin: 2px 0; background: dodgerblue; border-radius: 3px;} QSlider::handle:vertical {border: 1px solid #222; border-radius: 3px; height: 30px; background: #333;} QMenu{background: #929292; color: #000; } QMenu:selected{background: deeppink;} QMainWindow::separator{border: 1px solid %1;} QMainWindow{background-color: %1; color: white;}").arg(l_windowColor));

statusBar()->setStyleSheet( QString("QStatusBar{background-color: %1; border-top: 1px solid %2;}").arg(l_windowColor, l_windowBorder));
outputPane->setStyleSheet( QString("QTextEdit{background-color: %1; color: %2; border: 0px;}").arg(l_paneColor, l_windowForegroundColor));
Expand All @@ -1525,7 +1528,11 @@ void MainWindow::updateDarkMode(){
toolBar->setStyleSheet( QString("QToolBar{background-color: %1; border-bottom: 1px solid %2;}").arg(l_windowColor,l_windowBorder));
errorPane->setStyleSheet( QString("QTextEdit{background-color: %1;} .error-background{background-color: %2} ").arg(l_paneColor, currentTheme->color("ErrorBackground").name()));

///END orig

for(int i=0; i < tabs->count(); i++){
SonicPiScintilla *ws = (SonicPiScintilla *)tabs->widget(i);
ws->setFrameShape(QFrame::NoFrame);
}

foreach(QTextBrowser* pane, infoPanes) {
pane->setStyleSheet(defaultTextBrowserStyle);
Expand Down

0 comments on commit 4f6a67c

Please sign in to comment.