Skip to content

Commit

Permalink
Change button icons
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenmiao committed Jul 23, 2023
1 parent b317136 commit 2f5ceb1
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 32 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,10 @@
* Comments:
1. Update default font family name.
2. Fix default document directory on Linux.

# v2.8.40-x3d3s3
* Date: July 23, 2023
* Tag: https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.40
* Comments:
1. Fix fcitx5 input bug on Ubuntu (for fcitx5).
2. Change button icons.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In the age of digital creativity, the color palette has become an indispensable

Rickrack (**R**e**a**l-t**i**me **C**olor **K**it) is a free and user-friendly color editor. It is designed to generate a set of harmonious colors from the color wheel or other places. You can share these colors with your friends, or apply them into your creative works. What’s more, you can export them into individual files and import them into other softwares such as Adobe Photoshop, GIMP, Krita, Pencil 2D and Clip Studio Paint. Rickrack can run normally on operating systems such as Windows, Linux, and macOS.

[:rocket: v2.8.36 Update Notes](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.36)
[:rocket: v2.8.40 Update Notes](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.40)

[:house: Rickrack](https://eigenmiao.com/rickrack)

Expand All @@ -24,7 +24,7 @@ Rickrack (**R**e**a**l-t**i**me **C**olor **K**it) is a free and user-friendly c

焰火十二卷(实时色彩工具箱)是一款免费且实用的色彩编辑器。它可以帮助你从色轮或者其他地方生成一组和谐的色彩。你可以将这些色彩分享给其他人,或者应用到你自己的创作当中。此外,你也可以将色彩组或者色库导出为单独的色彩文档并导入其他软件中(如 Adobe Photoshop、GIMP、Krita、Pencil 2D 以及优动漫 Paint 等)。焰火十二卷可以在 Windows、Linux、macOS 等操作系统上正常运行。

[:rocket: v2.8.36 更新说明](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.36)
[:rocket: v2.8.40 更新说明](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.40)

[:house: 焰火十二卷](https://eigenmiao.com/yanhuo)

Expand Down Expand Up @@ -196,7 +196,7 @@ Support the continuous development of Rickrack!

# Installation
## Current Release
The latest preview version is [v2.8.36](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.36).
The latest preview version is [v2.8.40](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.40).

## Install Software
### Recommend: Install on Windows 10 or 11 via WinGet tool
Expand All @@ -205,7 +205,7 @@ winget install rickrack
```

## Install on other platforms
Download Software from [Github](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.36) or [Sourceforge](https://sourceforge.net/projects/rickrack/files/v2.8.36/). The installation steps are presented in [tutorials](https://eigenmiao.com/2021/12/12/rickrack-tutorial-en-v2.3.4/#Installation).
Download Software from [Github](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.40) or [Sourceforge](https://sourceforge.net/projects/rickrack/files/v2.8.40/). The installation steps are presented in [tutorials](https://eigenmiao.com/2021/12/12/rickrack-tutorial-en-v2.3.4/#Installation).

Here is a [video tutorial](https://www.bilibili.com/video/BV17r4y1L7R6/).

Expand Down Expand Up @@ -348,11 +348,20 @@ Welcome to participate in community discussions, report bugs and submit feature-

<div align="right"><a href="#table-of-content">:arrow_up: Back to TOC :arrow_up:</a></div>

# Acknowledgment
## Reviewers
# Acknowledgment / 致谢
Thank you to everyone who likes this software. Thank you to the following personnel for their unique insights and suggestions for improving the software. / 感谢所有喜欢这个软件的人。感谢以下人员为改进软件提供的独特见解和建议。

The names are sorted in chronological order. If there is any omission in the name, please do not hesitate to point it out. / 名称按时间顺序排列。名称若有遗漏,请不吝指出。

## Reviewers / 评论者
[TJ FREE@Youtube](https://www.youtube.com/watch?v=OUnktTCtv3E), [Robert Condorache@Softpedia](https://www.softpedia.com/get/Multimedia/Graphic/Graphic-Others/RickRack.shtml)

## Software Dependency
## Testers / 测试者
[VIctoryRoad@小众软件](https://meta.appinn.net/t/topic/43556/22), [yazii@小众软件](https://meta.appinn.net/t/topic/43556/18), [Betty@小众软件](https://meta.appinn.net/t/topic/43556/11),

[In addition, a user on PIXLS.US also conducted a detailed test of the software, but the website is currently unable to connect (503 error). I will add the link after the website is restored.](https://discuss.pixls.us/t/crafting-distinctive-color-palettes-for-gimp-enthusiasts/)

## Software Dependency Solvers / 软件依赖解决者
[Vedantmgoyal2009@Github](https://github.com/vedantmgoyal2009), [Dependabot@Github](https://github.com/apps/dependabot)

<div align="right"><a href="#rickrack">:arrow_up: Back to Top :arrow_up:</a> <a href="#table-of-content">:arrow_up: Back to TOC :arrow_up:</a></div>
5 changes: 3 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ These versions of Rickrack are currently being supported with security updates.

| Version | Supported |
| --------------------- | ------------------ |
| v2.8.36-x3d3s3-pre | :white_check_mark: |
| v2.8.40-x3d3s3-stable | :white_check_mark: |
| v2.8.36-x3d3s3-pre | :x: |
| v2.8.35-x3d3s3-pre | :x: |
| v2.8.27-x2d3s3-pre | :x: |
| v2.8.5-x2d3s3-pre | :x: |
| v2.7.26-x2d3s3-stable | :white_check_mark: |
| v2.7.26-x2d3s3-stable | :x: |
| v2.7.25-x2d3s3-stable | :x: |
| v2.7.23-x2d3s3-pre | :x: |
| v2.6.6-x2d2s2-pre | :x: |
Expand Down
4 changes: 2 additions & 2 deletions rickrack/rickrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"""

__VERSION__ = """
v2.8.36-x3d3s3-pre
v2.8.40-x3d3s3-stable
"""

__AUTHOR__ = """
Eigenmiao (eigenmiao@outlook.com)
"""

__DATE__ = """
July 16, 2023
July 23, 2023
"""

__HELP__ = """
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

setup(
name="Rickrack",
version="2.8.36",
version="2.8.40",
author="Eigenmiao",
author_email="eigenmiao@outlook.com",
description="Generate harmonious colors freely.",
Expand Down
2 changes: 1 addition & 1 deletion src/build/settings/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"app_name": "Rickrack",
"author": "Eigenmiao",
"main_module": "src/main/python/main.py",
"version": "2.8.36"
"version": "2.8.40"
}
20 changes: 18 additions & 2 deletions src/main/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
"""

__VERSION__ = """
v2.8.36-x3d3s3-pre
v2.8.40-x3d3s3-stable
"""

__AUTHOR__ = """
Eigenmiao (eigenmiao@outlook.com)
"""

__DATE__ = """
July 16, 2023
July 23, 2023
"""

__HELP__ = """
Expand Down Expand Up @@ -1095,13 +1095,29 @@ def _setup_interface_style(self, change_pn_colors=True):
curr_positive_color = Color.hec2rgb(qc_list_selected)
curr_negative_color = Color.hec2rgb(qc_list)
curr_wheel_ed_color = Color.hec2rgb(qc_workarea_over)
get_icon("box_up", forecolor, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("box_down", forecolor, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("box_left", forecolor, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("box_right", forecolor, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("sel_up", qc_list_over, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("sel_down", qc_list_over, backcolor, 0.64, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("float", forecolor, backcolor, 1.0, 0.0, self._args.global_temp_dir.path(), app_icon)
get_icon("close", forecolor, backcolor, 1.0, 0.0, self._args.global_temp_dir.path(), app_icon)
qstyle = qstyle.replace("$qc_workarea_over", "#" + qc_workarea_over)
qstyle = qstyle.replace("$qc_workarea", "#" + qc_workarea)
qstyle = qstyle.replace("$qc_char_over", "#" + qc_char_over)
qstyle = qstyle.replace("$qc_char", "#" + qc_char)
qstyle = qstyle.replace("$qc_list_selected", "#" + qc_list_selected)
qstyle = qstyle.replace("$qc_list_over", "#" + qc_list_over)
qstyle = qstyle.replace("$qc_list", "#" + qc_list)
qstyle = qstyle.replace("$up_arrow", "/".join([self._args.global_temp_dir.path(), "box_up.svg"]))
qstyle = qstyle.replace("$down_arrow", "/".join([self._args.global_temp_dir.path(), "box_down.svg"]))
qstyle = qstyle.replace("$left_arrow", "/".join([self._args.global_temp_dir.path(), "box_left.svg"]))
qstyle = qstyle.replace("$right_arrow", "/".join([self._args.global_temp_dir.path(), "box_right.svg"]))
qstyle = qstyle.replace("$sel_up_arrow", "/".join([self._args.global_temp_dir.path(), "sel_up.svg"]))
qstyle = qstyle.replace("$sel_down_arrow", "/".join([self._args.global_temp_dir.path(), "sel_down.svg"]))
qstyle = qstyle.replace("$float_arrow", "/".join([self._args.global_temp_dir.path(), "float.svg"]))
qstyle = qstyle.replace("$close_arrow", "/".join([self._args.global_temp_dir.path(), "close.svg"]))
if change_pn_colors:
self._args.modify_settings("positive_color", curr_positive_color)
self._args.modify_settings("negative_color", curr_negative_color)
Expand Down
32 changes: 23 additions & 9 deletions src/main/python/ricore/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@

class Args(object):
def __init__(self, resources, resetall=False, uselang=""):
self.info_version_zh = "v2.8.36-x3d3s3-预览版"
self.info_version_en = "v2.8.36-x3d3s3-pre"
self.info_date_zh = "2023年7月16日"
self.info_date_en = "July 16, 2023"
self.info_version_zh = "v2.8.40-x3d3s3-稳定版"
self.info_version_en = "v2.8.40-x3d3s3-stable"
self.info_date_zh = "2023年7月23日"
self.info_date_en = "July 23, 2023"
self.global_temp_dir = None
self.global_hm_rules = (
"analogous",
Expand Down Expand Up @@ -103,15 +103,29 @@ def __init__(self, resources, resetall=False, uselang=""):
self.pic_name = "Pictures"
if os.path.isfile(os.sep.join([self.home_dir, ".config", "user-dirs.dirs"])):
try:
with open(os.sep.join([self.home_dir, ".config", "user-dirs.dirs"]), "r") as f:
with open(os.sep.join([self.home_dir, ".config", "user-dirs.dirs"]), "r", encoding="utf-8") as f:
data = f.read().split()
except Exception as err:
data = []
for line in data:
if "DOCUMENTS" in line:
self.doc_name = line.split("\"")[-2].split("/")[-1]
elif "PICTURES" in line:
self.pic_name = line.split("\"")[-2].split("/")[-1]
if "DOCUMENTS" in line.upper():
if line.count('"') == 2:
doc_name = line.split('"')[-2].split("/")[-1]
if os.path.isdir(os.sep.join((self.home_dir, doc_name))):
self.doc_name = doc_name
elif line.count("'") == 2:
doc_name = line.split("'")[-2].split("/")[-1]
if os.path.isdir(os.sep.join((self.home_dir, doc_name))):
self.doc_name = doc_name
elif "PICTURES" in line.upper():
if line.count('"') == 2:
pic_name = line.split('"')[-2].split("/")[-1]
if os.path.isdir(os.sep.join((self.home_dir, pic_name))):
self.pic_name = pic_name
elif line.count("'") == 2:
pic_name = line.split("'")[-2].split("/")[-1]
if os.path.isdir(os.sep.join((self.home_dir, pic_name))):
self.pic_name = pic_name
self.usr_store = os.sep.join((self.home_dir, self.doc_name, "Rickrack"))
self.resources = resources
self.load_settings_failed = 0
Expand Down
41 changes: 33 additions & 8 deletions src/main/python/ricore/icon.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

__SVG_FMT__ = """
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="100mm" height="100mm" viewBox="0 0 {size} {size}" version="1.1"><g>
<svg width="{wid}mm" height="{hig}mm" viewBox="0 0 {swid} {shig}" version="1.1"><g>
{context}
</g></svg>
"""
Expand Down Expand Up @@ -110,19 +110,19 @@
"""

__SVG_UP__ = """
<path d="M11.9997 10.8284L7.04996 15.7782L5.63574 14.364L11.9997 8L18.3637 14.364L16.9495 15.7782L11.9997 10.8284Z" fill="#{forecolor}"></path>
<path style="fill:none;stroke:#{forecolor};stroke-width:2.4;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:{higopacity};stroke-miterlimit:4;stroke-dasharray:none" d="m 5.6652622,8.3644365 6.3347398,-6.3346739 6.33474,6.3346739" />
"""

__SVG_DOWN__ = """
<path d="M11.9997 13.1714L16.9495 8.22168L18.3637 9.63589L11.9997 15.9999L5.63574 9.63589L7.04996 8.22168L11.9997 13.1714Z" fill="#{forecolor}"></path>
<path style="fill:none;stroke:#{forecolor};stroke-width:2.4;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:{higopacity};stroke-miterlimit:4;stroke-dasharray:none" d="m 5.665258,3.6355811 6.33474,6.3346733 6.33474,-6.3346733" />
"""

__SVG_LEFT__ = """
<path d="M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" fill="#{forecolor}"></path>
<path style="fill:none;stroke:#{forecolor};stroke-width:2.4;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:{higopacity};stroke-miterlimit:4;stroke-dasharray:none" d="m 8.3644365,5.665258 -6.3346739,6.33474 6.3346739,6.33474" />
"""

__SVG_RIGHT__ = """
<path d="M13.1714 12.0007L8.22168 7.05093L9.63589 5.63672L15.9999 12.0007L9.63589 18.3646L8.22168 16.9504L13.1714 12.0007Z" fill="#{forecolor}"></path>
<path style="fill:none;stroke:#{forecolor};stroke-width:2.4;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:{higopacity};stroke-miterlimit:4;stroke-dasharray:none" d="m 3.6355811,5.6652622 6.3346733,6.3347398 -6.3346733,6.33474" />
"""

__SVG_ZOOM_IN__ = """
Expand All @@ -145,6 +145,16 @@
<path d="M3 21C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3ZM15 10H4V19H15V10ZM20 10H17V19H20V10ZM20 5H4V8H20V5Z" fill="#{forecolor}"></path>
"""

__SVG_FLOAT__ = """
<path style="fill:none;stroke:#{forecolor};stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 1.1759623,6.3462621 V 22.798078 H 17.647324 V 6.3462621 H 1.1759623" />
<path style="fill:none;stroke:#{forecolor};stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 8.7057274,1.1756913 H 22.824037 V 15.277248" />
"""

__SVG_CLOSE__ = """
<path style="fill:none;stroke:#{forecolor};stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 1.169074,1.1686236 22.830926,22.797538" />
<path style="fill:none;stroke:#{forecolor};stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 22.830926,1.1686236 1.169074,22.797538" />
"""

import os
from PyQt5.QtGui import QIcon

Expand All @@ -168,6 +178,12 @@ def get_icon(name, forecolor, backcolor, higopacity, lowopacity, temp_dir, defau
"home": __SVG_HOME__,
"update": __SVG_UPDATE__,
"forum": __SVG_FORUM__,
"sel_up": __SVG_UP__,
"sel_down": __SVG_DOWN__,
"box_up": __SVG_UP__,
"box_down": __SVG_DOWN__,
"box_left": __SVG_LEFT__,
"box_right": __SVG_RIGHT__,
"up": __SVG_UP__,
"down": __SVG_DOWN__,
"left": __SVG_LEFT__,
Expand All @@ -177,13 +193,22 @@ def get_icon(name, forecolor, backcolor, higopacity, lowopacity, temp_dir, defau
"zoom_out": __SVG_ZOOM_OUT__,
"layout_l": __SVG_LAYOUT_L__,
"layout_r": __SVG_LAYOUT_R__,
"float": __SVG_FLOAT__,
"close": __SVG_CLOSE__,
}
size = "24"
wid = hig = 100
swid = shig = 24
if name in ("sel_wheel", "sel_image", "sel_board", "sel_depot", "wheel", "image", "board", "depot", "about", "settings",):
size = "100"
swid = shig = "100"
elif name in ("sel_up", "sel_down", "box_up", "box_down", "up", "down"):
hig = hig / 2
shig = shig / 2
elif name in ("box_left", "box_right", "left", "right"):
wid = wid / 2
swid = swid / 2
if os.path.isdir(temp_dir) and name in name_dict:
with open(os.sep.join([temp_dir, "{}.svg".format(name)]), "w") as f:
context = name_dict[name].format(forecolor=forecolor, backcolor=backcolor, stroke=6, higopacity=higopacity, lowopacity=lowopacity)
f.write(__SVG_FMT__.format(context=context, size=size)[1:])
f.write(__SVG_FMT__.format(context=context, wid=wid, hig=hig, swid=swid, shig=shig)[1:])
return QIcon(os.sep.join([temp_dir, "{}.svg".format(name)]))
return default
Binary file modified src/main/resources/base/langs/en.qm
Binary file not shown.
Loading

0 comments on commit 2f5ceb1

Please sign in to comment.