Skip to content

Commit

Permalink
finalize version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 17, 2016
1 parent 6cfe2e3 commit f240f99
Show file tree
Hide file tree
Showing 15 changed files with 141 additions and 65 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ UMWP Autochanger is a little tool for multi-monitors windows users. I has two ma
* randomly and periodically change the wallpaper of all your monitors,
* manage sets of wallpapers, allowing you to quickly change which images are used.

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

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

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


### Branding
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 !
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 !


### License
UMWP Autochanger is released under GNU General Public License Version 3.
2 changes: 1 addition & 1 deletion src/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define APP_VERSION_URL "http://www.strangeplanet.fr/work/umwp-autochanger/last-version.txt"
#define APP_ISSUES_URL "https://github.com/mistic100/UMWP-Autochanger/issues"

#define APP_INSTALLER_SIZE 5000000
#define APP_INSTALLER_SIZE 6000000
#define APP_MAX_TRAVERSAL 3
#define APP_MAX_APP_RUNNING_MESSAGE_COUNT 3
#define APP_MIN_WIDTH 450
Expand Down
4 changes: 3 additions & 1 deletion src/customlayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct CustomLayout {
short mainCols;
UM::ALIGN mainPos;
bool borderEnabled;
bool borderScreenEnabled;
short borderWidth;
QRgb borderColor;

Expand All @@ -34,7 +35,8 @@ struct CustomLayout {
mainCols(4),
mainPos(UM::ALIGN_CENTER_CENTER),
borderEnabled(true),
borderWidth(3),
borderScreenEnabled(false),
borderWidth(10),
borderColor(Qt::black)
{}
};
Expand Down
34 changes: 30 additions & 4 deletions src/gui/customlayoutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void CustomLayoutDialog::showEvent(QShowEvent*)
connect(ui->mainCols, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
connect(ui->mainRows, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
connect(ui->borderEnabled, SIGNAL(toggled(bool)), this, SLOT(renderPreview()));
connect(ui->borderScreenEnabled, SIGNAL(toggled(bool)), this, SLOT(renderPreview()));
connect(ui->borderWidth, SIGNAL(valueChanged(int)), this, SLOT(renderPreview()));
connect(ui->borderColor, SIGNAL(colorChanged(QColor)), this, SLOT(renderPreview()));

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

ui->borderEnabled->setChecked(_layout.borderEnabled);
ui->borderScreenEnabled->setChecked(_layout.borderScreenEnabled);
ui->borderWidth->setValue(_layout.borderWidth);
ui->borderColor->setColor(QColor(_layout.borderColor));

on_rows_valueChanged(_layout.rows);
on_cols_valueChanged(_layout.cols);
on_borderWidth_valueChanged(_layout.borderWidth);
}

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

layout.mainEnabled = ui->mainEnabled->isChecked();
layout.borderScreenEnabled = ui->borderScreenEnabled->isChecked();
layout.mainRows = ui->mainRows->value();
layout.mainCols = ui->mainCols->value();
layout.mainPos = static_cast<UM::ALIGN>(ui_mainPosition->checkedId());
Expand Down Expand Up @@ -171,6 +175,15 @@ void CustomLayoutDialog::on_cols_valueChanged(int _val)
ui->mainColsMaxLabel->setText(QString::number(_val));
}

/**
* @brief Update border width label
* @param _val
*/
void CustomLayoutDialog::on_borderWidth_valueChanged(int _val)
{
ui->borderWidthLabel->setText(QString::number(_val));
}

/**
* @brief Render the preview
*/
Expand All @@ -196,19 +209,25 @@ void CustomLayoutDialog::renderPreview()
{
QRect newBlock = UM::scaledRect(block, wRatio, hRatio);

if (qAbs(newBlock.left() - size.width()) <= 2)
if (qAbs(newBlock.left() - size.width()) <= 3)
{
newBlock.setLeft(size.width());
newBlock.setLeft(size.width()-1);
}

if (qAbs(newBlock.bottom() - size.height()) <= 2)
if (qAbs(newBlock.bottom() - size.height()) <= 3)
{
newBlock.setBottom(size.height());
newBlock.setBottom(size.height()-1);
}

blocks.append(newBlock);
}

// draw background the same color of borders
if (layout.borderEnabled)
{
m_scene->addRect(QRect(QPoint(0, 0), size), Qt::NoPen, QBrush(QColor(layout.borderColor)));
}

// draw blocks
int i = 0;
foreach (const QRect block, blocks)
Expand All @@ -235,6 +254,7 @@ void CustomLayoutDialog::renderPreview()

QPen pen;
pen.setColor(QColor(layout.borderColor));
pen.setJoinStyle(Qt::MiterJoin);
pen.setWidth(qRound((double) layout.borderWidth * size.width() / monitorWidth));

foreach (const QRect block, blocks)
Expand All @@ -256,6 +276,12 @@ void CustomLayoutDialog::renderPreview()
}
}
}

if (layout.borderScreenEnabled)
{
QRect borderRect(pen.width()/2, pen.width()/2, size.width()-pen.width()-2, size.height()-pen.width()-2);
m_scene->addRect(borderRect, pen, Qt::NoBrush);
}
}

ui->view->update();
Expand Down
1 change: 1 addition & 0 deletions src/gui/customlayoutdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ private slots:
void renderPreview();
void on_rows_valueChanged(int _val);
void on_cols_valueChanged(int _val);
void on_borderWidth_valueChanged(int _val);
};

#endif // CustomLayoutDialog_H
28 changes: 24 additions & 4 deletions src/gui/customlayoutdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>780</width>
<height>360</height>
<height>375</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -28,7 +28,7 @@
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="2,1">
<layout class="QGridLayout" name="gridLayout_4" columnstretch="2,0,1">
<property name="topMargin">
<number>6</number>
</property>
Expand Down Expand Up @@ -85,10 +85,10 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="6" column="2">
<widget class="QLineEditColor" name="borderColor"/>
</item>
<item row="5" column="1">
<item row="5" column="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>Color</string>
Expand All @@ -98,6 +98,26 @@
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="borderWidthLabel">
<property name="minimumSize">
<size>
<width>26</width>
<height>0</height>
</size>
</property>
<property name="text">
<string notr="true">10</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="3">
<widget class="QCheckBox" name="borderScreenEnabled">
<property name="text">
<string>Screen border</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en_GB/changelog.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dl>
<dt>Version 2.1.0 <small></small></dt>
<dt>Version 2.1.0 <small>January 17th 2016</small></dt>
<dd>
<ul>
<li>New "Custom" wallpaper style: displays multiple images in a configurable grid</li>
Expand Down
29 changes: 17 additions & 12 deletions src/lang/en_GB/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,46 +201,51 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="550"/>
<location filename="../../gui/customlayoutdialog.ui" line="570"/>
<source>Grid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="133"/>
<location filename="../../gui/customlayoutdialog.ui" line="453"/>
<location filename="../../gui/customlayoutdialog.ui" line="574"/>
<location filename="../../gui/customlayoutdialog.ui" line="153"/>
<location filename="../../gui/customlayoutdialog.ui" line="473"/>
<location filename="../../gui/customlayoutdialog.ui" line="594"/>
<source>Rows</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="50"/>
<location filename="../../gui/customlayoutdialog.ui" line="41"/>
<source>Screen border</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="57"/>
<source>Width</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="94"/>
<location filename="../../gui/customlayoutdialog.ui" line="101"/>
<source>Color</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="192"/>
<location filename="../../gui/customlayoutdialog.ui" line="484"/>
<location filename="../../gui/customlayoutdialog.ui" line="605"/>
<location filename="../../gui/customlayoutdialog.ui" line="212"/>
<location filename="../../gui/customlayoutdialog.ui" line="504"/>
<location filename="../../gui/customlayoutdialog.ui" line="625"/>
<source>Columns</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
<location filename="../../gui/customlayoutdialog.ui" line="280"/>
<source>Position</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="432"/>
<location filename="../../gui/customlayoutdialog.ui" line="452"/>
<source>Tiles</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="107"/>
<location filename="../../gui/customlayoutdialog.ui" line="127"/>
<source>Fixed tile</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/lang/fr_FR/changelog.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dl>
<dt>Version 2.1.0 <small></small></dt>
<dt>Version 2.1.0 <small>17 Janvier 2016</small></dt>
<dd>
<ul>
<li>Nouveau style de fond d'écran "Personnalisé" : affiche plusieurs images sur un grille configurable</li>
Expand Down
29 changes: 17 additions & 12 deletions src/lang/fr_FR/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,46 +201,51 @@
<translation>Configuration du style personnalisé</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="550"/>
<location filename="../../gui/customlayoutdialog.ui" line="570"/>
<source>Grid</source>
<translation>Grille</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="133"/>
<location filename="../../gui/customlayoutdialog.ui" line="453"/>
<location filename="../../gui/customlayoutdialog.ui" line="574"/>
<location filename="../../gui/customlayoutdialog.ui" line="153"/>
<location filename="../../gui/customlayoutdialog.ui" line="473"/>
<location filename="../../gui/customlayoutdialog.ui" line="594"/>
<source>Rows</source>
<translation>Lignes</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="50"/>
<location filename="../../gui/customlayoutdialog.ui" line="41"/>
<source>Screen border</source>
<translation>Bordure de l&apos;écran</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="57"/>
<source>Width</source>
<translation>Largeur</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="94"/>
<location filename="../../gui/customlayoutdialog.ui" line="101"/>
<source>Color</source>
<translation>Couleur</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="192"/>
<location filename="../../gui/customlayoutdialog.ui" line="484"/>
<location filename="../../gui/customlayoutdialog.ui" line="605"/>
<location filename="../../gui/customlayoutdialog.ui" line="212"/>
<location filename="../../gui/customlayoutdialog.ui" line="504"/>
<location filename="../../gui/customlayoutdialog.ui" line="625"/>
<source>Columns</source>
<translation>Colonnes</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="432"/>
<location filename="../../gui/customlayoutdialog.ui" line="452"/>
<source>Tiles</source>
<translation>Tuiles</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="107"/>
<location filename="../../gui/customlayoutdialog.ui" line="127"/>
<source>Fixed tile</source>
<translation>Tuile principale</translation>
</message>
<message>
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
<location filename="../../gui/customlayoutdialog.ui" line="280"/>
<source>Position</source>
<translation>Position</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/lang/ru_RU/changelog.htm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<dl>
<dt>Версия 2.1.0 <small></small></dt>
<dt>Версия 2.1.0 <small>17 января 2016</small></dt>
<dd>
<ul>
<li>Новый стиль обоев "Изменённый": отображает несколько изображений в настраиваемой сетке.</li>
Expand Down
Loading

0 comments on commit f240f99

Please sign in to comment.