Add new windows dark theme (#125)

This commit is contained in:
Rafał Mikrut 2020-12-21 18:22:59 +01:00 committed by GitHub
parent 1d59199bb2
commit 4e3a6f63fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 87 additions and 10 deletions

View File

@ -212,13 +212,19 @@ jobs:
GTK_LIBRARY="$(pwd)/gtk_library"
GTK_APP="$(pwd)/gtk_app"
GTK_THEME="$(pwd)/gtk_theme"
wget https://github.com/qarmin/gtk_library_store/releases/download/3.24.0/mingw64.zip
unzip mingw64.zip -d $GTK_LIBRARY
GTK_LIBRARY="$GTK_LIBRARY/mingw64"
wget https://github.com/nrhodes91/AdMin/archive/master.zip
unzip master.zip -d $GTK_THEME
PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH="$GTK_LIBRARY/lib/pkgconfig" RUSTFLAGS="-L $GTK_LIBRARY/lib" cargo build --target=x86_64-pc-windows-gnu --bin czkawka_gui --release
strip target/x86_64-pc-windows-gnu/release/czkawka_gui.exe
mkdir $GTK_APP
cp target/x86_64-pc-windows-gnu/release/czkawka_gui.exe $GTK_APP
cp $GTK_LIBRARY/bin/*.dll $GTK_APP
@ -229,6 +235,14 @@ jobs:
mkdir $GTK_APP/lib
cp -r $GTK_LIBRARY/lib/gdk-pixbuf-2.0 $GTK_APP/lib
mkdir -p $GTK_APP/share/themes
mkdir -p $GTK_APP/share/gtk-3.0
echo "[Settings]" > $GTK_APP/share/gtk-3.0/settings.ini
echo "gtk-theme-name = admin-gtk3-dark-osx" >> $GTK_APP/share/gtk-3.0/settings.ini
echo "gtk-font-name = Segoe UI 10" >> $GTK_APP/share/gtk-3.0/settings.ini
echo "gtk-xft-rgba = rgb" >> $GTK_APP/share/gtk-3.0/settings.ini
cp $GTK_THEME/AdMin-master/admin-gtk3-dark-osx $GTK_APP/share/themes -r
zip -r gtk_app.zip $GTK_APP
env:
CARGO_INCREMENTAL: 0

24
LICENSE
View File

@ -343,3 +343,27 @@ License: CC-BY-4.0
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
GTK theme for Windows binaries
MIT License
Copyright (c) 2019-2020 Nick Rhodes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -21,6 +21,7 @@
- Similar Images - Finds images which are not exactly the same(different resolution, watermarks)
- Zeroed Files - Find files which are filled with zeros(usually corrupted)
- Same Music - Search for music with same artist, album etc.
- Invalid Symbolic Links - Shows symbolic links which points to non-existent files/directories
![Czkawka](https://user-images.githubusercontent.com/41945903/100857797-69809680-348d-11eb-8382-acdec05fd3b8.gif)
## Requirements
@ -166,10 +167,10 @@ So still is a big room for improvements.
| Similar images | X | | X |
| Zeroed Files| X | | |
| Music duplicates(tags) | X | | X |
| Invalid symlinks | X | X | |
| Installed packages | | X | |
| Invalid names | | X | |
| Names conflict | | X | |
| Invalid symlinks | | X | |
| Bad ID | | X | |
| Non stripped binaries | | X | |
| Redundant whitespace | | X | |
@ -190,7 +191,9 @@ The code should also be easy to read, so please use the simplest language possib
## Name
Czkawka is a Polish word which means _hiccup_.
I chose this name because I wanted to hear people speaking other languages pronounce it.
I chose this name because I wanted to hear people speaking other languages pronounce it.
This name is not as bad as it seems, because I was also thinking about using words like _żółć_, _gżegżółka_ or _żołądź_, but I gave up on these ideas because they contained Polish characters, which would cause difficulty in searching for the project.
At the beginning of the program creation, if the response concerning the name was unanimously negative, I prepared myself for a possible change of the name of the program, but the opinions were extremely mixed.
@ -200,6 +203,8 @@ Code is distributed under MIT license.
Icon is created by [jannuary](https://github.com/jannuary) and licensed CC-BY-4.0.
Windows dark theme is used from AdMin repo - https://github.com/nrhodes91/AdMin with MIT license
Program is completely free to use.
"Gratis to uczciwa cena" - "Free is a fair price"

View File

@ -111,7 +111,7 @@ impl Common {
let path = path_to_change.as_ref();
match path.to_str() {
Some(path) if path.is_char_boundary(1) => {
let replaced = path.replace('\\', "/");
let replaced = path.replace("/", "\\");
let mut new_path = OsString::new();
if replaced[1..].starts_with(':') {
new_path.push(replaced[..1].to_ascii_uppercase());
@ -154,8 +154,8 @@ mod test {
}
#[test]
fn test_windows_path() {
assert_eq!(PathBuf::from("C:/path.txt"), Common::normalize_windows_path("c:/PATH.tXt"));
assert_eq!(PathBuf::from("H:/reka/weza/roman.txt"), Common::normalize_windows_path("h:/RekA/Weza\\roMan.Txt"));
assert_eq!(PathBuf::from("T:/a"), Common::normalize_windows_path("T:\\A"));
assert_eq!(PathBuf::from("C:\\path.txt"), Common::normalize_windows_path("c:/PATH.tXt"));
assert_eq!(PathBuf::from("H:\\reka\\weza\\roman.txt"), Common::normalize_windows_path("h:/RekA/Weza\\roMan.Txt"));
assert_eq!(PathBuf::from("T:\\a"), Common::normalize_windows_path("T:\\A"));
}
}

View File

@ -2314,11 +2314,45 @@ Author: Rafał Mikrut
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_info">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="shadow_type">none</property>
<property name="can_focus">False</property>
<property name="margin_start">5</property>
<property name="margin_end">5</property>
<property name="margin_top">5</property>
<property name="margin_bottom">5</property>
<child>
<object class="GtkEntry" id="entry_info">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="has_frame">False</property>
<property name="shadow_type">none</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
<property name="has_frame">False</property>
<property name="text" translatable="yes">Czkawka 1.5.1</property>
<property name="xalign">1</property>
<property name="shadow_type">none</property>
<property name="caps_lock_warning">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>