Commit 0cb34d7a authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui
Browse files

Implement initial design

parent 3290ca42
Pipeline #98620 passed with stages
in 6 minutes and 45 seconds
......@@ -4,16 +4,16 @@ stages:
- review
variables:
BUNDLE: "color-contrast-nightly.flatpak"
BUNDLE: "colour-contrast-nightly.flatpak"
flatpak:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
stage: "test"
variables:
MANIFEST_PATH: "build-aux/org.gnome.design.ColorContrastDevel.json"
FLATPAK_MODULE: "color-contrast"
MANIFEST_PATH: "build-aux/org.gnome.design.ColourContrastDevel.json"
FLATPAK_MODULE: "colour-contrast"
MESON_ARGS: "-Dprofile=development"
APP_ID: "org.gnome.design.ColorContrastDevel"
APP_ID: "org.gnome.design.ColourContrastDevel"
script:
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
......
......@@ -72,9 +72,15 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "color-contrast"
name = "colorsys"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "colour-contrast"
version = "0.0.1"
dependencies = [
"colorsys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gdk 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gettext-rs 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gio 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
......@@ -82,6 +88,7 @@ dependencies = [
"gtk 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libhandy 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"pango 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
......@@ -433,6 +440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum cairo-sys-rs 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "90a1ec04603a78c111886a385edcec396dbfbc57ea26b9e74aeea6a1fe55dcca"
"checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d"
"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
"checksum colorsys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0089b7f73ef0f49a1562033951fc9ad150b84a1ecc3cea806843d4baaa8335"
"checksum fragile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05f8140122fa0d5dcb9fc8627cfce2b37cc1500f752636d46ea28bc26785c2f9"
"checksum gdk 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6243e995f41f3a61a31847e54cc719edce93dd9140c89dca3b9919be1cfe22d5"
"checksum gdk-pixbuf 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9726408ee1bbada83094326a99b9c68fea275f9dbb515de242a69e72051f4fcc"
......
[package]
name = "color-contrast"
name = "colour-contrast"
version = "0.0.1"
authors = ["Bilal Elmoussaoui <bilal.elmoussaoui@gnome.org>"]
edition = "2018"
......@@ -12,3 +12,5 @@ gdk = "0.11.0"
log = "0.4"
gettext-rs= { version = "0.4.1", features = ["gettext-system"] }
libhandy = "0.4.0"
pango = "0.7.0"
colorsys = "0.5.1"
<a href="https://flathub.org/apps/details/org.gnome.design.ColorContrast">
<a href="https://flathub.org/apps/details/org.gnome.design.ColourContrast">
<img src="https://flathub.org/assets/badges/flathub-badge-i-en.png" width="190px" />
</a>
# Color Contrast
# Colour Contrast
<img src="https://gitlab.gnome.org/World/design/color-contrast/raw/master/data/icons/org.gnome.design.ColorContrast.svg" width="128" height="128" />
<img src="https://gitlab.gnome.org/World/design/colour-contrast/raw/master/data/icons/org.gnome.design.ColourContrast.svg" width="128" height="128" />
<p>Find the right icon to use on your GNOME application.</p>
## Screenshots
......@@ -13,8 +13,8 @@
![screenshot](data/resources/screenshots/screenshot1.png)
</div>
## Hack on Color Contrast
To build the development version of Color Contrast and hack on the code
## Hack on Colour Contrast
To build the development version of Colour Contrast and hack on the code
see the [general guide](https://wiki.gnome.org/Newcomers/BuildProject)
for building GNOME apps with Flatpak and GNOME Builder.
......
......@@ -10,10 +10,10 @@ then
echo "DEBUG MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --verbose && \
cp "$CARGO_TARGET_DIR"/debug/color-contrast $3
cp "$CARGO_TARGET_DIR"/debug/colour-contrast $3
else
echo "RELEASE MODE"
cargo build --manifest-path \
"$MESON_SOURCE_ROOT"/Cargo.toml --release && \
cp "$CARGO_TARGET_DIR"/release/color-contrast $3
cp "$CARGO_TARGET_DIR"/release/colour-contrast $3
fi
{
"app-id": "org.gnome.design.ColorContrastDevel",
"app-id": "org.gnome.design.ColourContrastDevel",
"runtime": "org.gnome.Platform",
"runtime-version": "master",
"sdk": "org.gnome.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.rust-stable"
],
"command": "color-contrast",
"command": "colour-contrast",
"tags": [
"nightly"
],
......@@ -28,9 +28,9 @@
],
"env": {
"RUSTFLAGS": "--remap-path-prefix =../ --error-format=human",
"CARGO_HOME": "/run/build/color-contrast/cargo",
"CARGO_HOME": "/run/build/colour-contrast/cargo",
"RUST_BACKTRACE": "1",
"RUST_LOG": "color-contrast=debug"
"RUST_LOG": "colour-contrast=debug"
}
},
"modules": [{
......@@ -54,14 +54,14 @@
}]
},
{
"name": "color-contrast",
"name": "colour-contrast",
"buildsystem": "meson",
"config-opts": [
"-Dprofile=development"
],
"sources": [{
"type": "git",
"url": "https://gitlab.gnome.org/World/design/color-contrast.git"
"url": "https://gitlab.gnome.org/World/design/colour-contrast.git"
}]
}
]
......
......@@ -5,14 +5,14 @@
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">Color Contrast</name>
<name xml:lang="en">Colour Contrast</name>
<shortdesc xml:lang="en">
Color Contrast
Colour Contrast
</shortdesc>
<description xml:lang="en">
Check the contrast between a foreground and background color
Check the contrast between a foreground and background colour
</description>
<bug-database rdf:resource="https://gitlab.gnome.org/World/design/color-contrast" />
<bug-database rdf:resource="https://gitlab.gnome.org/World/design/colour-contrast" />
<category rdf:resource="http://api.gnome.org/doap-extensions#apps" />
<programming-language>Rust</programming-language>
<maintainer>
......
install_data(
'org.gnome.design.ColorContrast.svg',
'org.gnome.design.ColourContrast.svg',
install_dir: iconsdir / 'hicolor' / 'scalable' / 'apps',
rename: '@0@.svg'.format(application_id)
)
install_data(
'org.gnome.design.ColorContrast-symbolic.svg',
'org.gnome.design.ColourContrast-symbolic.svg',
install_dir: iconsdir / 'hicolor' / 'symbolic' / 'apps',
rename: '@0@-symbolic.svg'.format(application_id)
)
......@@ -5,7 +5,7 @@ desktop_conf.set('icon', application_id)
desktop_file = i18n.merge_file (
type: 'desktop',
input: configure_file(
input: 'org.gnome.design.ColorContrast.desktop.in.in',
input: 'org.gnome.design.ColourContrast.desktop.in.in',
output: '@BASENAME@',
configuration: desktop_conf
),
......@@ -31,7 +31,7 @@ appdata_conf.set('app-id', application_id)
appdata_conf.set('gettext-package', gettext_package)
appdata_file = i18n.merge_file (
input: configure_file(
input: 'org.gnome.design.ColorContrast.appdata.xml.in.in',
input: 'org.gnome.design.ColourContrast.appdata.xml.in.in',
output: '@BASENAME@',
configuration: appdata_conf
),
......@@ -55,7 +55,7 @@ gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
configure_file(
input: 'org.gnome.design.ColorContrast.gschema.xml.in',
input: 'org.gnome.design.ColourContrast.gschema.xml.in',
output: '@0@.gschema.xml'.format(application_id),
configuration: gschema_conf,
install: true,
......
......@@ -4,19 +4,19 @@
<id>@app-id@</id>
<metadata_license>CC0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>Color Contrast</name>
<name>Colour Contrast</name>
<summary>Find Adwaita icons</summary>
<description>
<p>Find the right icon to use on your GNOME application.</p>
</description>
<screenshots>
<screenshot type="default">
<image>https://gitlab.gnome.org/World/design/color-contrast/raw/master/data/resources/screenshots/screenshot1.png</image>
<image>https://gitlab.gnome.org/World/design/colour-contrast/raw/master/data/resources/screenshots/screenshot1.png</image>
<caption>Main Window</caption>
</screenshot>
</screenshots>
<url type="homepage">https://gitlab.gnome.org/World/design/color-contrast</url>
<url type="bugtracker">https://gitlab.gnome.org/World/design/color-contrast/issues</url>
<url type="homepage">https://gitlab.gnome.org/World/design/colour-contrast</url>
<url type="bugtracker">https://gitlab.gnome.org/World/design/colour-contrast/issues</url>
<url type="donation">https://liberapay.com/bielmoussaoui</url>
<content_rating type="oars-1.0" />
<kudos>
......
[Desktop Entry]
Name=Color Contrast
GenericName=Color Contrast
Name=Colour Contrast
GenericName=Colour Contrast
Comment=Find the right icon to use on your GNOME application
Type=Application
Exec=color-contrast
Exec=colour-contrast
Terminal=false
Categories=Utility;GNOME;GTK;
Keywords=Color;Contrast;Gnome;GTK;
Keywords=Colour;Contrast;Gnome;GTK;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=@icon@
StartupNotify=true
<?xml version="1.0" encoding="utf-8"?>
<schemalist>
<schema path="/org/gnome/design/ColorContrast/" id="@app-id@" gettext-domain="@gettext-package@">
<schema path="/org/gnome/design/ColourContrast/" id="@app-id@" gettext-domain="@gettext-package@">
<key name="window-width" type="i">
<default>-1</default>
<summary>Width of the last opened window</summary>
......
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/design/ColorContrast/">
<gresource prefix="/org/gnome/design/ColourContrast/">
<file compressed="true" preprocess="xml-stripblanks">about_dialog.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="shortcuts.ui">resources/ui/shortcuts.ui</file>
<file compressed="true" preprocess="xml-stripblanks" alias="menu.ui">resources/ui/menu.ui</file>
......
.icons-view-title {
font-size: 16px;
font-weight: bold;
padding: 6px;
.preview {
padding: 12px;
background-color: @theme_bg_color;
}
.no-results-label {
font-size: 32px;
font-weight: bold;
padding: 32px;
.preview-head{
font-size: 38px;
font-weight: bold;
color: @theme_fg_color;
}
/*FIXME: there's a 2px border width we don't want*/
.dialog-vbox {
margin: -2px
.preview-text{
font-size: 14px;
color: @theme_fg_color;
}
......@@ -6,9 +6,9 @@
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
<property name="program_name">@name-prefix@Color Contrast</property>
<property name="program_name">@name-prefix@Colour Contrast</property>
<property name="version">@version@</property>
<property name="website">https://gitlab.gnome.org/World/design/color-contrast</property>
<property name="website">https://gitlab.gnome.org/World/design/colour-contrast</property>
<property name="authors">Bilal Elmoussaoui</property>
<property name="translator_credits" translatable="yes">translator-credits</property>
<property name="artists">Tobias Bernard</property>
......
......@@ -7,7 +7,7 @@
<attribute name="action">win.show-help-overlay</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_About Color Contrast</attribute>
<attribute name="label" translatable="yes">_About Colour Contrast</attribute>
<attribute name="action">app.about</attribute>
</item>
</menu>
......
......@@ -4,7 +4,7 @@
<requires lib="gtk+" version="3.20"/>
<object class="GtkApplicationWindow" id="window">
<property name="can_focus">False</property>
<property name="title">@name-prefix@ Color Contrast</property>
<property name="title">@name-prefix@ Colour Contrast</property>
<property name="default_width">650</property>
<property name="default_height">500</property>
<property name="icon_name">@app-id@</property>
......@@ -12,7 +12,7 @@
<object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">@name-prefix@Color Contrast</property>
<property name="title" translatable="yes">@name-prefix@Colour Contrast</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkMenuButton" id="appmenu_button">
......
project('color-contrast',
project('colour-contrast',
'rust',
version: '0.0.1',
license: 'GPL3')
......@@ -52,7 +52,7 @@ else
version_suffix = ''
endif
application_id = 'org.gnome.design.ColorContrast@0@'.format(profile)
application_id = 'org.gnome.design.ColourContrast@0@'.format(profile)
subdir('po')
subdir('data')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment