Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Commit

Permalink
Updated to the latest version of the svgcleaner.
Browse files Browse the repository at this point in the history
gzip compression is enabled by default.
  • Loading branch information
RazrFalcon committed Nov 4, 2016
1 parent b0f0c47 commit 1a741e7
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 4 deletions.
6 changes: 5 additions & 1 deletion data/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
0.7.1

Added:
- (svgcleaner): 'Remove invisible elements' now removes default 'feColorMatrix' element.
- (svgcleaner): 'Remove unresolved classes from 'class' attributes' option.
- (svgcleaner-gui): Changelog tab with this text.

Changed:
- (svgcleaner): 'Remove invisible elements' now removes default 'feColorMatrix' element.
- (svgcleaner-gui): gzip compression is enabled by default.

Fixed:
- (libsvgdom): CSS processing when style defined multiple times.
- (libsvgdom): 'px' removing from the <list-of-lengths>.
Expand Down
Binary file modified data/doc.dat
Binary file not shown.
1 change: 1 addition & 0 deletions src/preferences/attributespage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ AttributesPage::AttributesPage(QWidget *parent) :
{ ui->chBoxMoveStyles, Attributes::MoveStylesToGroup },
{ ui->chBoxJoinStyles, Attributes::JoinStyleAttributes },
{ ui->chBoxApplyTransformToGradients, Attributes::ApplyTransformToGradients },
{ ui->chBoxRemoveUnresolvedClasses, Attributes::RemoveUnresolvedClasses },
});

loadConfig();
Expand Down
9 changes: 8 additions & 1 deletion src/preferences/attributespage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<item>
<widget class="QCheckBox" name="chBoxXmlnsXlink">
<property name="text">
<string>Remove an unused xmlns:xlink attribute</string>
<string>Remove an unused 'xmlns:xlink' attribute</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -116,6 +116,13 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="chBoxRemoveUnresolvedClasses">
<property name="text">
<string>Remove unresolved classes from 'class' attributes</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand Down
3 changes: 3 additions & 0 deletions src/preferences/cleaneroptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ namespace CleanerKey {
const QString MoveStylesToGroup = "move-styles-to-group";
const QString JoinStyleAttributes = "join-style-attributes";
const QString ApplyTransformToGradients = "apply-transform-to-gradients";
const QString RemoveUnresolvedClasses = "remove-unresolved-classes";
}

namespace Paths {
Expand Down Expand Up @@ -135,6 +136,7 @@ QVariant CleanerOptions::defaultValue(const QString &key)
hash.insert(Attributes::MoveStylesToGroup, true);
hash.insert(Attributes::JoinStyleAttributes, true);
hash.insert(Attributes::ApplyTransformToGradients, true);
hash.insert(Attributes::RemoveUnresolvedClasses, true);

hash.insert(Paths::PathsToRelative, true);
hash.insert(Paths::RemoveUnusedSegments, true);
Expand Down Expand Up @@ -221,6 +223,7 @@ QStringList CleanerOptions::genArgs()
Attributes::MoveStylesToGroup,
Attributes::JoinStyleAttributes,
Attributes::ApplyTransformToGradients,
Attributes::RemoveUnresolvedClasses,
};
for (const QString &name : attrList) {
genFlag(name, list);
Expand Down
1 change: 1 addition & 0 deletions src/preferences/cleaneroptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace CleanerKey {
extern const QString MoveStylesToGroup;
extern const QString JoinStyleAttributes;
extern const QString ApplyTransformToGradients;
extern const QString RemoveUnresolvedClasses;
}

namespace Paths {
Expand Down
4 changes: 2 additions & 2 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ QVariant AppSettings::defaultValue(const QString &key)
hash.insert(SettingKey::PreferencesTab, 0);
hash.insert(SettingKey::SavingMethod, SavingMethod::SelectFolder);
hash.insert(SettingKey::Jobs, QThread::idealThreadCount());
hash.insert(SettingKey::UseCompression, false);
hash.insert(SettingKey::UseCompression, true);
hash.insert(SettingKey::Compressor, CompressorName::SevenZip);
hash.insert(SettingKey::CompressionLevel, 4);
hash.insert(SettingKey::CompressOnlySvgz, false);
hash.insert(SettingKey::CompressOnlySvgz, true);
}

return hash.value(key);
Expand Down

0 comments on commit 1a741e7

Please sign in to comment.