1
0
forked from pool/virtualbox
virtualbox/virtualbox-fix-ui-background-color.patch
Larry Finger 606a5f1184 Accepting request 690451 from home:frispete:kernel
Hi Larry,

here's is my current state of VB affairs. It's more a RFC, but it
contains everything to build that biest for the most prominent
distributions.

The new patch virtualbox-fix-ui-background-color.patch is an attempt
to deuglify the UI with certain color schemes.

Again, RFC stuff for you to look at.

Thanks,
Pete


- adjust patch virtualbox-fix-ui-background-color.patch to really
  fix the background color messing...

- add patch to stop UI messing with Highlight Color for background
- apply fixes_for_qt5.13.patch for Qt versions >= 5.13.0 only

- Add setBadness('permissions-unauthorized-file',333) to rpmlintrc
- Remove suid attributes from all files
- add libgsoap version dependency >= 2.8.50 (recv_maxlength)

- Fix virtualbox wrapper script virtualbox-wrapper.sh to check
  60-vboxdrv.rules in /usr/lib/udev/rules.d, not /etc/udev/rules.d
  Logic is still flawed, until it doesn't take both locations into 
  account
- Add custom /etc/permission.d/virtualbox{,.paranoid} definitions
- Add compatibility symlink to keep old desktop links functional

OBS-URL: https://build.opensuse.org/request/show/690451
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=479
2019-04-05 14:49:14 +00:00

302 lines
16 KiB
Diff

Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
@@ -114,10 +114,6 @@ void UITools::preparePalette()
{
/* Setup palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
- QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Window, bodyColor);
- setPalette(pal);
}
void UITools::prepareLayout()
Index: b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
@@ -1299,7 +1299,7 @@ void UIVirtualBoxManager::prepareMenuBar
/* Make sure menu-bar fills own solid background: */
menuBar()->setAutoFillBackground(true);
QPalette pal = menuBar()->palette();
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
+ const QColor color = pal.color(QPalette::Active, QPalette::Window);
pal.setColor(QPalette::Active, QPalette::Button, color);
menuBar()->setPalette(pal);
}
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
@@ -121,10 +121,6 @@ void UIChooser::preparePalette()
{
/* Setup palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
- QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Window, bodyColor);
- setPalette(pal);
}
void UIChooser::prepareLayout()
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
@@ -1025,7 +1025,7 @@ void UIChooserItemMachine::paintBackgrou
else
{
/* Prepare color: */
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax));
@@ -1054,7 +1054,7 @@ void UIChooserItemMachine::paintBackgrou
/* Default background: */
else
{
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
color1 = backgroundColor.lighter(m_iDefaultLightnessMax);
color2 = backgroundColor.lighter(m_iDefaultLightnessMax - 70);
}
@@ -1075,7 +1075,7 @@ void UIChooserItemMachine::paintBackgrou
/* Default background: */
else
{
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Button);
color1 = backgroundColor.lighter(m_iDefaultLightnessMin);
color2 = backgroundColor.lighter(m_iDefaultLightnessMin - 40);
}
@@ -1110,7 +1110,7 @@ void UIChooserItemMachine::paintFrame(QP
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
@@ -710,7 +710,7 @@ void UIToolsItem::paintBackground(QPaint
/* Prepare color: */
const QColor backgroundColor = isEnabled()
? pal.color(QPalette::Active, QPalette::Highlight)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ : pal.color(QPalette::Disabled, QPalette::Highlight);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iHighlightLightnessMax));
@@ -749,7 +749,7 @@ void UIToolsItem::paintBackground(QPaint
/* Prepare color: */
const QColor backgroundColor = isEnabled()
? pal.color(QPalette::Active, QPalette::Highlight)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ : pal.color(QPalette::Disabled, QPalette::Highlight);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iHoverLightnessMax));
@@ -787,8 +787,8 @@ void UIToolsItem::paintBackground(QPaint
{
/* Prepare color: */
const QColor backgroundColor = isEnabled()
- ? pal.color(QPalette::Active, QPalette::Mid)
- : pal.color(QPalette::Disabled, QPalette::Midlight);
+ ? pal.color(QPalette::Active, QPalette::Window)
+ : pal.color(QPalette::Disabled, QPalette::Window);
/* Draw gradient: */
QLinearGradient bgGrad(rectangle.topLeft(), rectangle.bottomLeft());
bgGrad.setColorAt(0, backgroundColor.lighter(m_iDefaultLightnessMax));
@@ -821,7 +821,7 @@ void UIToolsItem::paintFrame(QPainter *p
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Button).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
@@ -355,14 +355,6 @@ void UIVirtualBoxManagerWidget::prepare(
{
/* Configure palette: */
setAutoFillBackground(true);
- QPalette pal = palette();
-#ifdef VBOX_WS_MAC
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(145);
-#else
- const QColor color = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
-#endif
- pal.setColor(QPalette::Window, color);
- setPalette(pal);
/* Prepare: */
prepareWidgets();
@@ -490,7 +482,7 @@ void UIVirtualBoxManagerWidget::prepareW
}
/* Adjust splitter colors according to main widgets it splits: */
- m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Midlight).darker(110));
+ m_pSplitter->configureColor(palette().color(QPalette::Active, QPalette::Button).darker(110));
/* Set the initial distribution. The right site is bigger. */
m_pSplitter->setStretchFactor(0, 2);
m_pSplitter->setStretchFactor(1, 3);
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
@@ -642,7 +642,7 @@ void UIChooserItem::paintFlatButton(QPai
/* Prepare colors: */
const QPalette pal = QApplication::palette();
- const QColor color = pal.color(QPalette::Active, QPalette::Mid);
+ const QColor color = pal.color(QPalette::Active, QPalette::Button);
/* Prepare pen: */
QPen pen;
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserView.cpp
@@ -178,10 +178,6 @@ void UIChooserView::prepare()
void UIChooserView::preparePalette()
{
/* Setup palette: */
- QPalette pal = qApp->palette();
- const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Base, bodyColor);
- setPalette(pal);
}
void UIChooserView::resizeEvent(QResizeEvent *pEvent)
Index: b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp
@@ -182,10 +182,6 @@ void UIToolsView::prepare()
void UIToolsView::preparePalette()
{
/* Setup palette: */
- QPalette pal = qApp->palette();
- const QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(110);
- pal.setColor(QPalette::Base, bodyColor);
- setPalette(pal);
}
void UIToolsView::resizeEvent(QResizeEvent *pEvent)
Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
@@ -667,7 +667,7 @@ void UIDetailsElement::paintBackground(Q
const QPalette pal = palette();
/* Paint default background: */
- const QColor defaultColor = pal.color(QPalette::Active, QPalette::Mid);
+ const QColor defaultColor = pal.color(QPalette::Active, QPalette::Window);
const QColor dcTone1 = defaultColor.lighter(m_iDefaultToneFinal);
const QColor dcTone2 = defaultColor.lighter(m_iDefaultToneStart);
QLinearGradient gradientDefault(fullRect.topLeft(), fullRect.bottomLeft());
@@ -708,7 +708,7 @@ void UIDetailsElement::paintFrame(QPaint
: optionRect;
/* Paint frame: */
- const QColor strokeColor = palette().color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultToneStart);
+ const QColor strokeColor = palette().color(QPalette::Active, QPalette::Window).lighter(m_iDefaultToneStart);
QPen pen(strokeColor);
pen.setWidth(0);
pPainter->setPen(pen);
Index: b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
@@ -110,7 +110,7 @@ void UIToolBar::paintEvent(QPaintEvent *
const QRect rectangle = pEvent->rect();
/* Prepare gradient: */
- const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Mid);
+ const QColor backgroundColor = palette().color(QPalette::Active, QPalette::Window);
QLinearGradient gradient(rectangle.topLeft(), rectangle.bottomLeft());
gradient.setColorAt(0, backgroundColor.lighter(130));
gradient.setColorAt(1, backgroundColor.lighter(125));
Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp
@@ -700,7 +700,7 @@ void UIDetailsSet::paintBackground(QPain
const QRect optionRect = pOptions->rect;
/* Paint default background: */
- const QColor defaultColor = palette().color(QPalette::Active, QPalette::Midlight).darker(110);
+ const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).darker(110);
pPainter->fillRect(optionRect, defaultColor);
/* Restore painter: */
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGlobal.cpp
@@ -655,7 +655,7 @@ void UIChooserItemGlobal::paintBackgroun
pPainter->fillRect(rectangle, bgGrad);
#else
/* Prepare color: */
- QColor backgroundColor = pal.color(QPalette::Active, QPalette::Mid).lighter(160);
+ QColor backgroundColor = pal.color(QPalette::Active, QPalette::Window).lighter(160);
/* Draw gradient: */
pPainter->fillRect(rectangle, backgroundColor);
#endif
@@ -686,7 +686,7 @@ void UIChooserItemGlobal::paintFrame(QPa
strokeColor = pal.color(QPalette::Active, QPalette::Highlight).lighter(m_iHoverLightnessMin - 50);
/* Default frame: */
else
- strokeColor = pal.color(QPalette::Active, QPalette::Mid).lighter(m_iDefaultLightnessMin);
+ strokeColor = pal.color(QPalette::Active, QPalette::Window).lighter(m_iDefaultLightnessMin);
/* Create/assign pen: */
QPen pen(strokeColor);
Index: b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp
@@ -288,7 +288,7 @@ void UIDetailsGroup::paintBackground(QPa
#ifdef VBOX_WS_MAC
const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(145);
#else
- const QColor defaultColor = palette().color(QPalette::Active, QPalette::Mid).lighter(160);
+ const QColor defaultColor = palette().color(QPalette::Active, QPalette::Window).lighter(160);
#endif
pPainter->fillRect(optionRect, defaultColor);
Index: b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
===================================================================
--- a/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
+++ b/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
@@ -1630,7 +1630,7 @@ void UIChooserItemGroup::paintBackground
const QPalette pal = palette();
const QColor headerColor = pal.color(QPalette::Active,
model()->currentItems().contains(this) ?
- QPalette::Highlight : QPalette::Midlight);
+ QPalette::Highlight : QPalette::Button);
/* Root-item: */
if (isRoot())
@@ -1714,7 +1714,7 @@ void UIChooserItemGroup::paintFrame(QPai
const QPalette pal = palette();
const QColor strokeColor = pal.color(QPalette::Active,
model()->currentItems().contains(this) ?
- QPalette::Highlight : QPalette::Midlight).darker(headerDarkness() + 10);
+ QPalette::Highlight : QPalette::Button).darker(headerDarkness() + 10);
/* Create/assign pen: */
QPen pen(strokeColor);