Skip to content

Commit f240f99

Browse files
committed
finalize version 2.1.0
1 parent 6cfe2e3 commit f240f99

15 files changed

+141
-65
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ UMWP Autochanger is a little tool for multi-monitors windows users. I has two ma
77
* randomly and periodically change the wallpaper of all your monitors,
88
* manage sets of wallpapers, allowing you to quickly change which images are used.
99

10-
Version : 2.0
11-
Release date : 28/06/2015
12-
Author : Damien "Mistic" Sorel
13-
Website : http://www.strangeplanet.fr/work/umwp-autochanger
14-
License : GNU General Public License Version 3
10+
[Documentation](http://www.strangeplanet.fr/work/umwp-autochanger#help)
1511

1612
![screenshot](http://www.strangeplanet.fr/work/umwp-autochanger/src/screenshot-main.png)
1713

@@ -29,4 +25,8 @@ You will need Qt 5.4.
2925

3026

3127
### Branding
32-
UMWP originally meant **UltraMon Wallpaper**. When I removed UltraMon dependency in version 2 I searched a new name that match with the acronym. And I came with **Ultimate Monitor Wallpaper**, which is very pompous !
28+
UMWP originally meant **UltraMon Wallpaper**. When I removed UltraMon dependency in version 2 I searched a new name that match with the acronym. And I came with **Ultimate Monitor Wallpaper**, which is very pompous !
29+
30+
31+
### License
32+
UMWP Autochanger is released under GNU General Public License Version 3.

src/constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define APP_VERSION_URL "http://www.strangeplanet.fr/work/umwp-autochanger/last-version.txt"
2222
#define APP_ISSUES_URL "https://github.com/mistic100/UMWP-Autochanger/issues"
2323

24-
#define APP_INSTALLER_SIZE 5000000
24+
#define APP_INSTALLER_SIZE 6000000
2525
#define APP_MAX_TRAVERSAL 3
2626
#define APP_MAX_APP_RUNNING_MESSAGE_COUNT 3
2727
#define APP_MIN_WIDTH 450

src/customlayout.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ struct CustomLayout {
1919
short mainCols;
2020
UM::ALIGN mainPos;
2121
bool borderEnabled;
22+
bool borderScreenEnabled;
2223
short borderWidth;
2324
QRgb borderColor;
2425

@@ -34,7 +35,8 @@ struct CustomLayout {
3435
mainCols(4),
3536
mainPos(UM::ALIGN_CENTER_CENTER),
3637
borderEnabled(true),
37-
borderWidth(3),
38+
borderScreenEnabled(false),
39+
borderWidth(10),
3840
borderColor(Qt::black)
3941
{}
4042
};

src/gui/customlayoutdialog.cpp

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ void CustomLayoutDialog::showEvent(QShowEvent*)
7373
connect(ui->mainCols, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
7474
connect(ui->mainRows, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
7575
connect(ui->borderEnabled, SIGNAL(toggled(bool)), this, SLOT(renderPreview()));
76+
connect(ui->borderScreenEnabled, SIGNAL(toggled(bool)), this, SLOT(renderPreview()));
7677
connect(ui->borderWidth, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
7778
connect(ui->borderColor, SIGNAL(colorChanged(QColor)), this, SLOT(renderPreview()));
7879

@@ -109,11 +110,13 @@ void CustomLayoutDialog::setCustLayout(const CustomLayout &_layout)
109110
ui_mainPosition->setCheckedId(_layout.mainPos);
110111

111112
ui->borderEnabled->setChecked(_layout.borderEnabled);
113+
ui->borderScreenEnabled->setChecked(_layout.borderScreenEnabled);
112114
ui->borderWidth->setValue(_layout.borderWidth);
113115
ui->borderColor->setColor(QColor(_layout.borderColor));
114116

115117
on_rows_valueChanged(_layout.rows);
116118
on_cols_valueChanged(_layout.cols);
119+
on_borderWidth_valueChanged(_layout.borderWidth);
117120
}
118121

119122
/**
@@ -132,6 +135,7 @@ CustomLayout CustomLayoutDialog::getCustLayout() const
132135
layout.maxCols = ui->tileCols->upperValue();
133136

134137
layout.mainEnabled = ui->mainEnabled->isChecked();
138+
layout.borderScreenEnabled = ui->borderScreenEnabled->isChecked();
135139
layout.mainRows = ui->mainRows->value();
136140
layout.mainCols = ui->mainCols->value();
137141
layout.mainPos = static_cast<UM::ALIGN>(ui_mainPosition->checkedId());
@@ -171,6 +175,15 @@ void CustomLayoutDialog::on_cols_valueChanged(int _val)
171175
ui->mainColsMaxLabel->setText(QString::number(_val));
172176
}
173177

178+
/**
179+
* @brief Update border width label
180+
* @param _val
181+
*/
182+
void CustomLayoutDialog::on_borderWidth_valueChanged(int _val)
183+
{
184+
ui->borderWidthLabel->setText(QString::number(_val));
185+
}
186+
174187
/**
175188
* @brief Render the preview
176189
*/
@@ -196,19 +209,25 @@ void CustomLayoutDialog::renderPreview()
196209
{
197210
QRect newBlock = UM::scaledRect(block, wRatio, hRatio);
198211

199-
if (qAbs(newBlock.left() - size.width()) <= 2)
212+
if (qAbs(newBlock.left() - size.width()) <= 3)
200213
{
201-
newBlock.setLeft(size.width());
214+
newBlock.setLeft(size.width()-1);
202215
}
203216

204-
if (qAbs(newBlock.bottom() - size.height()) <= 2)
217+
if (qAbs(newBlock.bottom() - size.height()) <= 3)
205218
{
206-
newBlock.setBottom(size.height());
219+
newBlock.setBottom(size.height()-1);
207220
}
208221

209222
blocks.append(newBlock);
210223
}
211224

225+
// draw background the same color of borders
226+
if (layout.borderEnabled)
227+
{
228+
m_scene->addRect(QRect(QPoint(0, 0), size), Qt::NoPen, QBrush(QColor(layout.borderColor)));
229+
}
230+
212231
// draw blocks
213232
int i = 0;
214233
foreach (const QRect block, blocks)
@@ -235,6 +254,7 @@ void CustomLayoutDialog::renderPreview()
235254

236255
QPen pen;
237256
pen.setColor(QColor(layout.borderColor));
257+
pen.setJoinStyle(Qt::MiterJoin);
238258
pen.setWidth(qRound((double) layout.borderWidth * size.width() / monitorWidth));
239259

240260
foreach (const QRect block, blocks)
@@ -256,6 +276,12 @@ void CustomLayoutDialog::renderPreview()
256276
}
257277
}
258278
}
279+
280+
if (layout.borderScreenEnabled)
281+
{
282+
QRect borderRect(pen.width()/2, pen.width()/2, size.width()-pen.width()-2, size.height()-pen.width()-2);
283+
m_scene->addRect(borderRect, pen, Qt::NoBrush);
284+
}
259285
}
260286

261287
ui->view->update();

src/gui/customlayoutdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ private slots:
4646
void renderPreview();
4747
void on_rows_valueChanged(int _val);
4848
void on_cols_valueChanged(int _val);
49+
void on_borderWidth_valueChanged(int _val);
4950
};
5051

5152
#endif // CustomLayoutDialog_H

src/gui/customlayoutdialog.ui

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<x>0</x>
1111
<y>0</y>
1212
<width>780</width>
13-
<height>360</height>
13+
<height>375</height>
1414
</rect>
1515
</property>
1616
<property name="windowTitle">
@@ -28,7 +28,7 @@
2828
<property name="checkable">
2929
<bool>true</bool>
3030
</property>
31-
<layout class="QGridLayout" name="gridLayout_4" columnstretch="2,1">
31+
<layout class="QGridLayout" name="gridLayout_4" columnstretch="2,0,1">
3232
<property name="topMargin">
3333
<number>6</number>
3434
</property>
@@ -85,10 +85,10 @@
8585
</property>
8686
</widget>
8787
</item>
88-
<item row="6" column="1">
88+
<item row="6" column="2">
8989
<widget class="QLineEditColor" name="borderColor"/>
9090
</item>
91-
<item row="5" column="1">
91+
<item row="5" column="2">
9292
<widget class="QLabel" name="label_8">
9393
<property name="text">
9494
<string>Color</string>
@@ -98,6 +98,26 @@
9898
</property>
9999
</widget>
100100
</item>
101+
<item row="6" column="1">
102+
<widget class="QLabel" name="borderWidthLabel">
103+
<property name="minimumSize">
104+
<size>
105+
<width>26</width>
106+
<height>0</height>
107+
</size>
108+
</property>
109+
<property name="text">
110+
<string notr="true">10</string>
111+
</property>
112+
</widget>
113+
</item>
114+
<item row="7" column="0" colspan="3">
115+
<widget class="QCheckBox" name="borderScreenEnabled">
116+
<property name="text">
117+
<string>Screen border</string>
118+
</property>
119+
</widget>
120+
</item>
101121
</layout>
102122
</widget>
103123
</item>

src/lang/en_GB/changelog.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<dl>
2-
<dt>Version 2.1.0 <small></small></dt>
2+
<dt>Version 2.1.0 <small>January 17th 2016</small></dt>
33
<dd>
44
<ul>
55
<li>New "Custom" wallpaper style: displays multiple images in a configurable grid</li>

src/lang/en_GB/main.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,46 +201,51 @@
201201
<translation type="unfinished"></translation>
202202
</message>
203203
<message>
204-
<location filename="../../gui/customlayoutdialog.ui" line="550"/>
204+
<location filename="../../gui/customlayoutdialog.ui" line="570"/>
205205
<source>Grid</source>
206206
<translation type="unfinished"></translation>
207207
</message>
208208
<message>
209-
<location filename="../../gui/customlayoutdialog.ui" line="133"/>
210-
<location filename="../../gui/customlayoutdialog.ui" line="453"/>
211-
<location filename="../../gui/customlayoutdialog.ui" line="574"/>
209+
<location filename="../../gui/customlayoutdialog.ui" line="153"/>
210+
<location filename="../../gui/customlayoutdialog.ui" line="473"/>
211+
<location filename="../../gui/customlayoutdialog.ui" line="594"/>
212212
<source>Rows</source>
213213
<translation type="unfinished"></translation>
214214
</message>
215215
<message>
216-
<location filename="../../gui/customlayoutdialog.ui" line="50"/>
216+
<location filename="../../gui/customlayoutdialog.ui" line="41"/>
217+
<source>Screen border</source>
218+
<translation type="unfinished"></translation>
219+
</message>
220+
<message>
221+
<location filename="../../gui/customlayoutdialog.ui" line="57"/>
217222
<source>Width</source>
218223
<translation type="unfinished"></translation>
219224
</message>
220225
<message>
221-
<location filename="../../gui/customlayoutdialog.ui" line="94"/>
226+
<location filename="../../gui/customlayoutdialog.ui" line="101"/>
222227
<source>Color</source>
223228
<translation type="unfinished"></translation>
224229
</message>
225230
<message>
226-
<location filename="../../gui/customlayoutdialog.ui" line="192"/>
227-
<location filename="../../gui/customlayoutdialog.ui" line="484"/>
228-
<location filename="../../gui/customlayoutdialog.ui" line="605"/>
231+
<location filename="../../gui/customlayoutdialog.ui" line="212"/>
232+
<location filename="../../gui/customlayoutdialog.ui" line="504"/>
233+
<location filename="../../gui/customlayoutdialog.ui" line="625"/>
229234
<source>Columns</source>
230235
<translation type="unfinished"></translation>
231236
</message>
232237
<message>
233-
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
238+
<location filename="../../gui/customlayoutdialog.ui" line="280"/>
234239
<source>Position</source>
235240
<translation type="unfinished"></translation>
236241
</message>
237242
<message>
238-
<location filename="../../gui/customlayoutdialog.ui" line="432"/>
243+
<location filename="../../gui/customlayoutdialog.ui" line="452"/>
239244
<source>Tiles</source>
240245
<translation type="unfinished"></translation>
241246
</message>
242247
<message>
243-
<location filename="../../gui/customlayoutdialog.ui" line="107"/>
248+
<location filename="../../gui/customlayoutdialog.ui" line="127"/>
244249
<source>Fixed tile</source>
245250
<translation type="unfinished"></translation>
246251
</message>

src/lang/fr_FR/changelog.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<dl>
2-
<dt>Version 2.1.0 <small></small></dt>
2+
<dt>Version 2.1.0 <small>17 Janvier 2016</small></dt>
33
<dd>
44
<ul>
55
<li>Nouveau style de fond d'écran "Personnalisé" : affiche plusieurs images sur un grille configurable</li>

src/lang/fr_FR/main.ts

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -201,46 +201,51 @@
201201
<translation>Configuration du style personnalisé</translation>
202202
</message>
203203
<message>
204-
<location filename="../../gui/customlayoutdialog.ui" line="550"/>
204+
<location filename="../../gui/customlayoutdialog.ui" line="570"/>
205205
<source>Grid</source>
206206
<translation>Grille</translation>
207207
</message>
208208
<message>
209-
<location filename="../../gui/customlayoutdialog.ui" line="133"/>
210-
<location filename="../../gui/customlayoutdialog.ui" line="453"/>
211-
<location filename="../../gui/customlayoutdialog.ui" line="574"/>
209+
<location filename="../../gui/customlayoutdialog.ui" line="153"/>
210+
<location filename="../../gui/customlayoutdialog.ui" line="473"/>
211+
<location filename="../../gui/customlayoutdialog.ui" line="594"/>
212212
<source>Rows</source>
213213
<translation>Lignes</translation>
214214
</message>
215215
<message>
216-
<location filename="../../gui/customlayoutdialog.ui" line="50"/>
216+
<location filename="../../gui/customlayoutdialog.ui" line="41"/>
217+
<source>Screen border</source>
218+
<translation>Bordure de l&apos;écran</translation>
219+
</message>
220+
<message>
221+
<location filename="../../gui/customlayoutdialog.ui" line="57"/>
217222
<source>Width</source>
218223
<translation>Largeur</translation>
219224
</message>
220225
<message>
221-
<location filename="../../gui/customlayoutdialog.ui" line="94"/>
226+
<location filename="../../gui/customlayoutdialog.ui" line="101"/>
222227
<source>Color</source>
223228
<translation>Couleur</translation>
224229
</message>
225230
<message>
226-
<location filename="../../gui/customlayoutdialog.ui" line="192"/>
227-
<location filename="../../gui/customlayoutdialog.ui" line="484"/>
228-
<location filename="../../gui/customlayoutdialog.ui" line="605"/>
231+
<location filename="../../gui/customlayoutdialog.ui" line="212"/>
232+
<location filename="../../gui/customlayoutdialog.ui" line="504"/>
233+
<location filename="../../gui/customlayoutdialog.ui" line="625"/>
229234
<source>Columns</source>
230235
<translation>Colonnes</translation>
231236
</message>
232237
<message>
233-
<location filename="../../gui/customlayoutdialog.ui" line="432"/>
238+
<location filename="../../gui/customlayoutdialog.ui" line="452"/>
234239
<source>Tiles</source>
235240
<translation>Tuiles</translation>
236241
</message>
237242
<message>
238-
<location filename="../../gui/customlayoutdialog.ui" line="107"/>
243+
<location filename="../../gui/customlayoutdialog.ui" line="127"/>
239244
<source>Fixed tile</source>
240245
<translation>Tuile principale</translation>
241246
</message>
242247
<message>
243-
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
248+
<location filename="../../gui/customlayoutdialog.ui" line="280"/>
244249
<source>Position</source>
245250
<translation>Position</translation>
246251
</message>

0 commit comments

Comments
 (0)