Skip to content

Commit 6cfe2e3

Browse files
committed
Fix batch edition of custom layout + update ru_RU
1 parent 010f2e4 commit 6cfe2e3

File tree

5 files changed

+28
-29
lines changed

5 files changed

+28
-29
lines changed

src/gui/customlayoutdialog.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,7 @@ void CustomLayoutDialog::renderPreview()
194194

195195
foreach (const QRect block, rawBlocks)
196196
{
197-
QRect newBlock(
198-
qRound(block.x() * wRatio),
199-
qRound(block.y() * hRatio),
200-
qRound(block.width() * wRatio),
201-
qRound(block.height() * hRatio)
202-
);
197+
QRect newBlock = UM::scaledRect(block, wRatio, hRatio);
203198

204199
if (qAbs(newBlock.left() - size.width()) <= 2)
205200
{

src/lang/ru_RU/changelog.htm

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
<dl>
2+
<dt>Версия 2.1.0 <small></small></dt>
3+
<dd>
4+
<ul>
5+
<li>Новый стиль обоев "Изменённый": отображает несколько изображений в настраиваемой сетке.</li>
6+
<li>Новый язык: Русский, спасибо ZZPot</li>
7+
<li>Данные приложения хранятся в директории пользователя для лучшей совместимости с Windows 10</li>
8+
<li>Улучшена производительность</li>
9+
<li>Улучшена выборка произвольных обоев из активных наборов</li>
10+
</ul>
11+
</dd>
12+
213
<dt>Версия 2.0.0 <small>28 июня 2015</small></dt>
314
<dd>
4-
<p><b>У UMWP Autochanger теперь новое имя!</b> Теперь это<b style="color:red;">Ultimate Monitor Wallpaper Autochanger</b>. Имя заменено потому что теперь UMWP не зависит от UltraMon и полностью автономен.</p>
15+
<p><b>У UMWP Autochanger теперь новое имя!</b> Теперь это <b style="color:red;">Ultimate Monitor Wallpaper Autochanger</b>. Имя заменено потому что теперь UMWP не зависит от UltraMon и полностью автономен.</p>
516

617
<ul>
718
<li>Удалены все зависимости от UltraMon.</li>

src/lang/ru_RU/main.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!DOCTYPE TS>
3-
<TS version="2.1" language="ru">
1+
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.1">
42
<context>
53
<name>ChangelogDialog</name>
64
<message>
@@ -215,12 +213,12 @@
215213
<message>
216214
<location filename="../../gui/customlayoutdialog.ui" line="50"/>
217215
<source>Width</source>
218-
<translation type="unfinished"></translation>
216+
<translation>Ширина</translation>
219217
</message>
220218
<message>
221219
<location filename="../../gui/customlayoutdialog.ui" line="94"/>
222220
<source>Color</source>
223-
<translation type="unfinished"></translation>
221+
<translation>Цвет</translation>
224222
</message>
225223
<message>
226224
<location filename="../../gui/customlayoutdialog.ui" line="192"/>
@@ -229,6 +227,11 @@
229227
<source>Columns</source>
230228
<translation>Колонки</translation>
231229
</message>
230+
<message>
231+
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
232+
<source>Position</source>
233+
<translation>Положение</translation>
234+
</message>
232235
<message>
233236
<location filename="../../gui/customlayoutdialog.ui" line="432"/>
234237
<source>Tiles</source>
@@ -239,11 +242,6 @@
239242
<source>Fixed tile</source>
240243
<translation>Фиксированная плитка</translation>
241244
</message>
242-
<message>
243-
<location filename="../../gui/customlayoutdialog.ui" line="260"/>
244-
<source>Position</source>
245-
<translation>Положение</translation>
246-
</message>
247245
<message>
248246
<location filename="../../gui/customlayoutdialog.ui" line="26"/>
249247
<source>Border</source>
@@ -263,7 +261,7 @@
263261
<message>
264262
<location filename="../../gui/mainlist.cpp" line="67"/>
265263
<source>This set does not have any image files.</source>
266-
<translation type="unfinished"></translation>
264+
<translation>В этом наборе нет изображений.</translation>
267265
</message>
268266
<message>
269267
<location filename="../../gui/mainlist.cpp" line="71"/>
@@ -773,4 +771,4 @@
773771
<translation>Старт</translation>
774772
</message>
775773
</context>
776-
</TS>
774+
</TS>

src/settings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,13 @@ void Settings::editSets(const QList<Set*> _sets, const Set &_data)
510510
{
511511
foreach (Set* set, _sets)
512512
{
513-
if (_sets.size() == 1) set->setName(_data.name());
514-
if (_data.type() != UM::W_NONE) set->setType(_data.type());
513+
if (_sets.size() == 1) set->setName(_data.name());
514+
if (_data.type() != UM::W_NONE) set->setType(_data.type());
515515
if (_data.style() != UM::IM_NONE) set->setStyle(_data.style());
516-
if (_data.mode() != UM::MODE_NONE)set->setMode(_data.mode());
516+
if (_data.mode() != UM::MODE_NONE) set->setMode(_data.mode());
517517
if (_data.hotkey() != QHotKeyWidget::KEEP_KEY) set->setHotkey(_data.hotkey());
518518
if (_data.style() == UM::IM_CUSTOM) set->setCustLayout(_data.custLayout());
519-
else set->setCustLayout(CustomLayout());
519+
else if (_data.style() != UM::IM_NONE) set->setCustLayout(CustomLayout());
520520

521521
QLOG_DEBUG() << "Edit set: " << set->name();
522522
}

src/wallpapergenerator.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,7 @@ QString WallpaperGenerator::generateCustomFile(int _idx, Set* _set, QVector<QStr
373373

374374
foreach (const QRect block, rawBlocks)
375375
{
376-
QRect newBlock(
377-
qRound(block.x() * wRatio),
378-
qRound(block.y() * hRatio),
379-
qRound(block.width() * wRatio),
380-
qRound(block.height() * hRatio)
381-
);
376+
QRect newBlock = UM::scaledRect(block, wRatio, hRatio);
382377

383378
if (qAbs(newBlock.left() - scrRect.width()) <= 2)
384379
{

0 commit comments

Comments
 (0)