aboutsummaryrefslogtreecommitdiff
path: root/src-qt5
diff options
context:
space:
mode:
authorWeblate <noreply@weblate.org>2017-08-17 17:33:19 +0000
committerWeblate <noreply@weblate.org>2017-08-17 17:33:19 +0000
commit3fd8b3f9a34e8decb6c4f51f7dda10571f6fca2f (patch)
tree5973e6a977789ca13dcf896de971c807eb5f6fc4 /src-qt5
parentTranslated using Weblate (Czech) (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-3fd8b3f9a34e8decb6c4f51f7dda10571f6fca2f.tar.gz
lumina-3fd8b3f9a34e8decb6c4f51f7dda10571f6fca2f.tar.bz2
lumina-3fd8b3f9a34e8decb6c4f51f7dda10571f6fca2f.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src-qt5')
-rw-r--r--src-qt5/core-utils/lumina-xconfig/MainUI.cpp50
-rw-r--r--src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_cs.ts12
2 files changed, 39 insertions, 23 deletions
diff --git a/src-qt5/core-utils/lumina-xconfig/MainUI.cpp b/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
index 030b96be..1a3662fe 100644
--- a/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
+++ b/src-qt5/core-utils/lumina-xconfig/MainUI.cpp
@@ -80,7 +80,7 @@ ScreenInfo MainUI::currentScreenInfo(){
}
void MainUI::AddScreenToWidget(ScreenInfo screen){
- qDebug() << "Add Screen To Widget:" << screen.ID << screen.geom;
+ //qDebug() << "Add Screen To Widget:" << screen.ID << screen.geom;
QLabel *lab = new QLabel(this);
lab->setAlignment(Qt::AlignCenter);
QMdiSubWindow *it = ui->mdiArea->addSubWindow(lab, Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
@@ -90,7 +90,7 @@ void MainUI::AddScreenToWidget(ScreenInfo screen){
it->setWhatsThis(screen.ID);
QRect scaled( screen.geom.topLeft()*scaleFactor, screen.geom.size()*scaleFactor);
- qDebug() << " - Scaled:" << scaled;
+ //qDebug() << " - Scaled:" << scaled;
it->show();
it->setGeometry(scaled); //scale it down for the display
it->setFixedSize(scaled.size());
@@ -117,9 +117,9 @@ void MainUI::SyncBackend(){
//Find the window associated with this screen
for(int s=0; s<windows.length(); s++){
if(windows[s]->whatsThis()==SCREENS[i].ID){
- qDebug() << "Adjust geom of window:" << SCREENS[i].geom;
+ //qDebug() << "Adjust geom of window:" << SCREENS[i].geom;
SCREENS[i].geom.moveTopLeft( windows[s]->geometry().topLeft()/scaleFactor );
- qDebug() << " - New Geom:" << SCREENS[i].geom;
+ //qDebug() << " - New Geom:" << SCREENS[i].geom;
if(SCREENS[i].applyChange<1){ SCREENS[i].applyChange = (windows[s]->widget()->isEnabled() ? 0 : 1); } //disabled window is one that will be removed
}
}
@@ -244,14 +244,23 @@ void MainUI::tileScreensY(bool activeonly){
while(overlap){
QRegion tmp(cur->pos().x(), newy, cur->width(), cur->height());
QRegion diff = tmp.subtracted(total);
- overlap = (diff.boundingRect()!=tmp.boundingRect());
+ overlap = (diff.boundingRect()!=tmp.boundingRect() || diff.rects().length()>1);
//qDebug() << "Check Y Overlap:" << newy << overlap << tmp.boundingRect() << diff.boundingRect();
if(overlap){
+ QVector<QRect> rects = diff.rects();
QRect bound = diff.boundingRect();
- if(bound.isNull()){ newy+=cur->height(); }
- else if(newy!=bound.top()){ newy = bound.top(); }
- else if(newy!=bound.bottom()){ newy = bound.bottom() + 1; }
- else{ newy++; } //make sure it always changes - no infinite loops!!
+ //qDebug() << " - got Y overlap:" << bound << rects;
+ if( bound.isNull() || rects.isEmpty() ){ newy+=cur->height(); }
+ else{
+ int orig = newy;
+ newy = bound.top();
+ for(int i=0; i<rects.length(); i++){
+ //qDebug() << " - Check Rect:" << newy << rects[i] << cur->height();
+ if(rects[i].height()==cur->height()){ continue; } //skip this one - just the same height
+ if(rects[i].top()>newy || newy==bound.bottom()){ newy=rects[i].top(); }
+ }
+ if(orig==newy){ newy = bound.bottom()+1; } //make sure it always changes - no infinite loops!!
+ }
}
}
if(!activeonly || cur==active){ cur->move(cur->pos().x(), newy); }
@@ -292,16 +301,23 @@ void MainUI::tileScreensX(bool activeonly){
while(overlap){
QRegion tmp(newx, cur->pos().y(), cur->width(), cur->height());
QRegion diff = tmp.subtracted(total);
- overlap = (diff.boundingRect()!=tmp.boundingRect());
- //qDebug() << "Check X Overlap:" << newx << overlap << tmp.boundingRect() << diff.boundingRect();
+ overlap = (diff.boundingRect()!=tmp.boundingRect() || diff.rects().length()>1);
+ //qDebug() << "Check X Overlap:" << newx << overlap << total.rects() << tmp.boundingRect() << diff.boundingRect();
if(overlap){
+ QVector<QRect> rects = diff.rects();
QRect bound = diff.boundingRect();
- if(bound.isNull()){ newx+=cur->width(); }
- else if(newx!=bound.left()){ newx = bound.left(); }
- else if(newx!=bound.right()){ newx = bound.right() + 1; }
- else{ newx++; }//make sure it always changes - no infinite loops!!
- }else{
- qDebug() << "Found Area:" << tmp << diff << newx;
+ //qDebug() << " - got X overlap:" << bound << rects;
+ if( bound.isNull() || rects.isEmpty() ){ newx+=cur->width(); }
+ else{
+ int orig = newx;
+ newx = bound.left();
+ for(int i=0; i<rects.length(); i++){
+ //qDebug() << " - Check Rect:" << newx << rects[i] << cur->width();
+ if(rects[i].width()==cur->width()){ continue; } //skip this one - just the same width
+ if(rects[i].left()>newx || newx==bound.right()){ newx=rects[i].left(); }
+ }
+ if(orig==newx){ newx = bound.right()+1; } //make sure it always changes - no infinite loops!!
+ }
}
}
if(!activeonly || cur==active){ cur->move(newx, cur->pos().y()); }
diff --git a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_cs.ts b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_cs.ts
index b05d0e12..0bf26f10 100644
--- a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_cs.ts
+++ b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_cs.ts
@@ -346,8 +346,8 @@
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="516"/>
- <source>The &quot;lumina-fileinfo&quot; utility could not be found on the system. Please install it first.</source>
- <translation>Nástroj &quot;lumina-fileinfo&quot; nebyl nalezen.Prosím nainstalujte ho první.</translation>
+ <source>The "lumina-fileinfo" utility could not be found on the system. Please install it first.</source>
+ <translation>Nástroj "lumina-fileinfo" nebyl nalezen.Prosím nainstalujte ho první.</translation>
</message>
<message>
<location filename="../widgets/DirWidget2.cpp" line="542"/>
@@ -420,17 +420,17 @@
<message>
<location filename="../FODialog.cpp" line="133"/>
<source>YesToAll</source>
- <translation type="unfinished"></translation>
+ <translation>Ano na vše</translation>
</message>
<message>
<location filename="../FODialog.cpp" line="134"/>
<source>NoToAll</source>
- <translation type="unfinished"></translation>
+ <translation>Ne na vše</translation>
</message>
<message>
<location filename="../FODialog.cpp" line="135"/>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>Storno</translation>
</message>
<message>
<location filename="../FODialog.cpp" line="154"/>
@@ -591,7 +591,7 @@ Nové umístění: %2</translation>
</message>
<message>
<location filename="../gitWizard.ui" line="232"/>
- <source>Click &quot;Next&quot; to start downloading the repository</source>
+ <source>Click "Next" to start downloading the repository</source>
<translation>Kliknutím na Další zahajte stahování repozitáře</translation>
</message>
<message>
bgstack15