Changeset 3616d3f


Ignore:
Timestamp:
08/11/14 06:14:15 (2 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3
Children:
d028d59
Parents:
a505055
Message:

Clean up the default screen detection methodology for the desktop and the config utility.
For the utility, it should now hide the screen selector properly if only a single screen is available, and for the desktop, it will always use the left-most screen as the default.

Location:
lumina
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-config/mainUI.cpp

    ree2bcf0 r3616d3f  
    2020  desktop = new QDesktopWidget(); 
    2121  ui->spin_screen->setMinimum(1); 
    22   if(desktop->screenCount() == 1){ 
    23     ui->spin_screen->setValue(1); 
    24     //Hide these since no other screens 
    25     ui->group_screen->setVisible(false); 
    26   }else{ 
    2722    //Make sure this is only allows the current number of screens 
    2823    ui->spin_screen->setMaximum(desktop->screenCount()); 
    29   } 
    30   qDebug() << "Number of Screens:" << desktop->screenCount(); 
     24    ui->spin_screen->setValue(desktop->primaryScreen()+1); //have the current screen auto-selected 
     25  //qDebug() << "Number of Screens:" << desktop->screenCount(); 
    3126  sysApps = LXDG::sortDesktopNames( LXDG::systemDesktopFiles() ); 
    3227   
  • lumina/lumina-desktop/LDesktop.cpp

    ree2bcf0 r3616d3f  
    1414  desktop = QApplication::desktop(); 
    1515    connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int))); 
    16   defaultdesktop = (deskNum== desktop->primaryScreen()); 
     16  defaultdesktop = (desktop->screenGeometry(desktopnumber).x()==0); 
    1717  desktoplocked = true; 
    1818  qDebug() << "Desktop #"<<deskNum<<" -> "<< desktop->screenGeometry(desktopnumber).x() << desktop->screenGeometry(desktopnumber).y() << desktop->screenGeometry(desktopnumber).width() << desktop->screenGeometry(desktopnumber).height(); 
  • lumina/lumina-desktop/LPanel.cpp

    r57eed72 r3616d3f  
    66//=========================================== 
    77#include "LPanel.h" 
     8#include "LSession.h" 
    89 
    910LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ 
     
    1920  settings = file; 
    2021  screennum = scr; 
    21   screen = new QDesktopWidget(); 
     22  screen = LSession::desktop(); 
    2223  PPREFIX = "panel"+QString::number(screennum)+"."+QString::number(num)+"/"; 
    23   if(settings->value("defaultpanel",QString::number(screen->primaryScreen())+".0").toString()==QString::number(screennum)+"."+QString::number(num) ){ defaultpanel=true;} 
    24   else{defaultpanel=false; } 
     24  defaultpanel = (screen->screenGeometry(screennum).x()==0 && num==0); 
     25  //if(settings->value("defaultpanel",QString::number(screen->primaryScreen())+".0").toString()==QString::number(screennum)+"."+QString::number(num) ){ defaultpanel=true;} 
     26  //else{defaultpanel=false; } 
    2527  horizontal=true; //use this by default initially 
    2628  //Setup the panel 
Note: See TracChangeset for help on using the changeset viewer.