Skip to content

Commit

Permalink
Fixed color between windows and linux on output pane
Browse files Browse the repository at this point in the history
  • Loading branch information
CJCombrink committed May 29, 2017
1 parent c23ea56 commit 9c0d269
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion outputpane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,15 @@ QWidget *OutputPaneDelegate::createEditor(QWidget *parent, const QStyleOptionVie
QWidget* widget = new QWidget(parent);
QHBoxLayout* layout = new QHBoxLayout();
widget->setLayout(layout);
widget->setStyleSheet("background-color:palette(highlight)");
/* Set the background of the widget based on the OS. For some
* reason Windows uses the button color to highlight the selected
* row, but on Linux the highlight color is used. Not sure what
* MacOS uses but this will also use the highlight color. */
#ifdef _WIN32
widget->setStyleSheet(QStringLiteral("background-color:palette(button)"));
#else
widget->setStyleSheet(QStringLiteral("background-color:palette(highlight)"));
#endif /* WIN 32 */
layout->setMargin(0);
Word word = d->wordSelected;
QStringList suggestions = index.data().toString().split(QLatin1String(", "));
Expand Down

0 comments on commit 9c0d269

Please sign in to comment.