diff options
author | Ken Moore <moorekou@gmail.com> | 2015-09-18 11:30:13 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-09-18 11:30:13 -0400 |
commit | 17963f47081fe7559854e633635f10d4b6062a58 (patch) | |
tree | 32e7aa88305892ce3f0ee48df49c2d924e2be8ce /lumina-desktop | |
parent | Clean up a little bit of the URL syntax handling in lumina-open. Now it will ... (diff) | |
download | lumina-17963f47081fe7559854e633635f10d4b6062a58.tar.gz lumina-17963f47081fe7559854e633635f10d4b6062a58.tar.bz2 lumina-17963f47081fe7559854e633635f10d4b6062a58.zip |
Turn off a bunch of debugging for the lumina-desktop, and adjust the desktopview plugin a bit more.
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LSession.cpp | 4 | ||||
-rw-r--r-- | lumina-desktop/LXcbEventFilter.cpp | 4 | ||||
-rw-r--r-- | lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp | 12 |
3 files changed, 11 insertions, 9 deletions
diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 4d631bc9..d1dc54e5 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -641,7 +641,7 @@ QSettings* LSession::DesktopPluginSettings(){ WId LSession::activeWindow(){ //Check the last active window pointer first WId active = XCB->ActiveWindow(); - qDebug() << "Check Active Window:" << active << lastActiveWin; + //qDebug() << "Check Active Window:" << active << lastActiveWin; if(RunningApps.contains(active)){ lastActiveWin = active; } else if(RunningApps.contains(lastActiveWin) && XCB->WindowState(lastActiveWin) >= LXCB::VISIBLE){} //no change needed else{ @@ -653,7 +653,7 @@ WId LSession::activeWindow(){ break; } } - qDebug() << " -- New Last Active Window:" << lastActiveWin; + //qDebug() << " -- New Last Active Window:" << lastActiveWin; } return lastActiveWin; } diff --git a/lumina-desktop/LXcbEventFilter.cpp b/lumina-desktop/LXcbEventFilter.cpp index aa38002b..f7a11dad 100644 --- a/lumina-desktop/LXcbEventFilter.cpp +++ b/lumina-desktop/LXcbEventFilter.cpp @@ -96,9 +96,9 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag //============================== default: if(TrayDmgFlag!=0){ - //if( (ev->response_type & ~0x80)==TrayDmgFlag){ + if( (ev->response_type & ~0x80)==TrayDmgFlag){ session->WindowDamageEvent( ((xcb_damage_notify_event_t*)ev)->drawable ); - //} + } }/*else{ qDebug() << "Default Event:" << (ev->response_type & ~0x80); }*/ diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp index 585f6531..b1300ec8 100644 --- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp +++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp @@ -13,11 +13,12 @@ DesktopViewPlugin::DesktopViewPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){ this->setLayout( new QVBoxLayout()); this->layout()->setContentsMargins(0,0,0,0); + list = new QListWidget(this); list->setViewMode(QListView::IconMode); list->setFlow(QListWidget::TopToBottom); //Qt bug workaround - need the opposite flow in the widget constructor list->setWrapping(true); - list->setSpacing(2); + list->setSpacing(4); list->setSelectionBehavior(QAbstractItemView::SelectItems); list->setSelectionMode(QAbstractItemView::ExtendedSelection); list->setContextMenuPolicy(Qt::CustomContextMenu); @@ -131,7 +132,7 @@ void DesktopViewPlugin::updateContents(){ list->clear(); int icosize = this->readSetting("IconSize",64).toInt(); - QSize gridSZ = QSize(2*icosize,icosize+4+(2*this->fontMetrics().height()) ); + QSize gridSZ = QSize(qRound(1.8*icosize),icosize+4+(2*this->fontMetrics().height()) ); //qDebug() << "Icon Size:" << icosize <<"Grid Size:" << gridSZ.width() << gridSZ.height(); list->setGridSize(gridSZ); list->setIconSize(QSize(icosize,icosize)); @@ -140,6 +141,7 @@ void DesktopViewPlugin::updateContents(){ for(int i=0; i<files.length(); i++){ QListWidgetItem *it = new QListWidgetItem; it->setSizeHint(gridSZ); //ensure uniform item sizes + //it->setForeground(QBrush(Qt::black, Qt::Dense2Pattern)); //Try to use a font color which will always be visible it->setTextAlignment(Qt::AlignCenter); it->setWhatsThis(files[i].absoluteFilePath()); QString txt; @@ -170,18 +172,18 @@ void DesktopViewPlugin::updateContents(){ } //Now adjust the visible text as necessary based on font/grid sizing it->setToolTip(txt); - if(this->fontMetrics().width(txt) > (gridSZ.width()-2) ){ + if(this->fontMetrics().width(txt) > (gridSZ.width()-4) ){ //int dash = this->fontMetrics().width("-"); //Text too long, try to show it on two lines txt = txt.section(" ",0,2).replace(" ","\n"); //First take care of any natural breaks if(txt.contains("\n")){ //need to check each line QStringList txtL = txt.split("\n"); - for(int i=0; i<txtL.length(); i++){ txtL[i] = this->fontMetrics().elidedText(txtL[i], Qt::ElideRight, gridSZ.width()); } + for(int i=0; i<txtL.length(); i++){ txtL[i] = this->fontMetrics().elidedText(txtL[i], Qt::ElideRight, gridSZ.width()-4); } txt = txtL.join("\n"); if(txtL.length()>2){ txt = txt.section("\n",0,1); } //only keep the first two lines }else{ - txt = this->fontMetrics().elidedText(txt,Qt::ElideRight, 2*gridSZ.width()); + txt = this->fontMetrics().elidedText(txt,Qt::ElideRight, 2*(gridSZ.width()-4)); //Now split the line in half for the two lines txt.insert( (txt.count()/2), "\n"); } |