[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [plasma-mediacenter/PMC/0.9] /: Add a disable-opengl
From:       Shantanu Tushar <shaan7in () gmail ! com>
Date:       2012-04-05 19:12:54
Message-ID: 20120405191254.6AE0CA60A9 () git ! kde ! org
[Download RAW message or body]

Git commit 6821517a8610c329a93e4a8d4adac1fa6f85cd46 by Shantanu Tushar.
Committed on 05/04/2012 at 21:12.
Pushed by shantanu into branch 'PMC/0.9'.

Add a disable-opengl

M  +1    -0    components/mediawelcome/MediaWelcome.qml
M  +1    -0    shells/newshell/main.cpp
M  +6    -4    shells/newshell/mainwindow.cpp

http://commits.kde.org/plasma-mediacenter/6821517a8610c329a93e4a8d4adac1fa6f85cd46

diff --git a/components/mediawelcome/MediaWelcome.qml b/components/mediawelcome/MediaWelcome.qml
index 2c2d688..4e6dc19 100644
--- a/components/mediawelcome/MediaWelcome.qml
+++ b/components/mediawelcome/MediaWelcome.qml
@@ -37,6 +37,7 @@ PathView {
             width: parent.width/3
             height: parent.height/3
             scale: PathView.iconScale
+            opacity: PathView.iconScale
 
             Column {
                 anchors.fill: parent
diff --git a/shells/newshell/main.cpp b/shells/newshell/main.cpp
index b2edbe3..97cbb82 100644
--- a/shells/newshell/main.cpp
+++ b/shells/newshell/main.cpp
@@ -50,6 +50,7 @@ int main(int argc, char *argv[])
     KCmdLineArgs::init(argc, argv, &aboutData);
     KCmdLineOptions options;
     options.add("fullscreen", ki18n("Starts Plasma Media Center in fullscreen mode (the default)"));
+    options.add("disable-opengl", ki18n("Starts Plasma Media Center with OpenGL support"));
     KCmdLineArgs::addCmdLineOptions(options);
 
     KApplication app;
diff --git a/shells/newshell/mainwindow.cpp b/shells/newshell/mainwindow.cpp
index d3ffa81..21ba221 100644
--- a/shells/newshell/mainwindow.cpp
+++ b/shells/newshell/mainwindow.cpp
@@ -35,13 +35,15 @@ MainWindow::MainWindow(QWidget *parent) : KMainWindow(parent)
     if (args->isSet("fullscreen")) {
         toggleFullScreen();
     }
-    args->clear();
 
     QDeclarativeView *view = new QDeclarativeView(this);
 
-    QGLWidget *glWidget = new QGLWidget;
-    glWidget->setAutoFillBackground(false);
-    view->setViewport(glWidget);
+    if (!args->isSet("disable-opengl")) {
+        QGLWidget *glWidget = new QGLWidget;
+        glWidget->setAutoFillBackground(false);
+        view->setViewport(glWidget);
+    }
+    args->clear();
       
     view->setAttribute(Qt::WA_OpaquePaintEvent);
     view->setAttribute(Qt::WA_NoSystemBackground);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic