Compare commits

...
2 Commits
Author SHA1 Message Date
yyc12345 2015ebf925 feat: cleanup bitmaps in references 2026-09-09 14:08:57 +08:00
yyc12345 1e15fb4783 feat: support monitor zoom fit best 2026-09-09 14:02:58 +08:00
5 changed files with 120 additions and 35 deletions
-35
View File
@@ -1,35 +0,0 @@
Ivar Leidus, CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0>, via Wikimedia Commons
https://commons.wikimedia.org/wiki/File:Niinsaare_j%C3%A4rv.jpg
Pascalou petit, CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0>, via Wikimedia Commons
https://commons.wikimedia.org/wiki/File:Aster_Tataricus.JPG
https://commons.wikimedia.org/wiki/File:Great_pershing_balloon_derby_2005_09_04.jpg
Balloon launch at the Great Pershing Balloon Derby near Brookfield, Missouri on September 4, 2005. Photo taken by Joe DeShon.
This file is licensed under the Creative Commons Attribution 2.5 Generic license.
https://commons.wikimedia.org/wiki/File:Wild_Petunia_Blue_Flower_1.JPG
I, Jonathan Zander, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons
https://commons.wikimedia.org/wiki/File:Daisy_(Argyranthemum_frutescens).jpg
Fir0002, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons
https://commons.wikimedia.org/wiki/File:Nycticorax_nycticorax12.jpg
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
Calibas
https://commons.wikimedia.org/wiki/File:Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg
This work is in the public domain in its country of origin and other countries and areas where the copyright term is the author's life plus 100 years or fewer.
Vincent van Gogh
Google Arts & Culture
https://commons.wikimedia.org/wiki/File:Tulipa_suaveolens_floriade_to_Canberra.jpg
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
John O'Neill
https://commons.wikimedia.org/wiki/File:International_hot_air_balloon_festival_in_leon_guanajuato_mexico_2012.jpg
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
Tomascastelazo
https://commons.wikimedia.org/wiki/File:Hot-air_balloon_in_Tambov_-_02.jpg
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Alexander Novikov
+5
View File
@@ -0,0 +1,5 @@
[[licenses]]
file = 'Nycticorax_nycticorax12.jpg'
license = "CC-BY-SA-3.0"
authors = ["Calibas"]
source = 'https://commons.wikimedia.org/wiki/File:Nycticorax_nycticorax12.jpg'
+5
View File
@@ -44,6 +44,11 @@ license = "LGPL-2.1-only"
authors = ["KDE Oxygen Icon Theme Team", "yyc12345"] authors = ["KDE Oxygen Icon Theme Team", "yyc12345"]
source = 'https://invent.kde.org/frameworks/oxygen-icons' source = 'https://invent.kde.org/frameworks/oxygen-icons'
[[licenses]]
file = 'image-png-checkerboard.svg'
license = "CC-BY-SA-4.0"
authors = ["yyc12345"]
[[licenses]] [[licenses]]
file = 'dialog-infomation.svg' file = 'dialog-infomation.svg'
license = "LGPL-2.1-only" license = "LGPL-2.1-only"
@@ -37,6 +37,19 @@ def register(ctx: AuroraContext) -> None:
), ),
build_image_zoom_original_icon, build_image_zoom_original_icon,
) )
ctx.register(
"nostd/action/monitor-zoom-fit-best",
(
TempArtSource("component", "triangle-left.png"),
TempArtSource("component", "triangle-down.png"),
TempArtSource("component", "triangle-right.png"),
TempArtSource("component", "triangle-up.png"),
TempArtSource("component", "monitor.png"),
NewArtSource(),
FdArtSink(FdContext.Actions, "monitor-zoom-fit-best"),
),
build_monitor_zoom_fit_best_icon,
)
def build_image_properties_icon( def build_image_properties_icon(
@@ -145,3 +158,86 @@ def build_image_zoom_original_icon(
# save it # save it
fd_sink.push(env, icon) fd_sink.push(env, icon)
def build_monitor_zoom_fit_best_icon(
env: AuroraEnvironment,
tri_left_src: TempArtSource,
tri_down_src: TempArtSource,
tri_right_src: TempArtSource,
tri_up_src: TempArtSource,
inner_src: TempArtSource,
new_art: NewArtSource,
fd_sink: FdArtSink,
) -> None:
# load triangle assets
TRI_SIZE = (200, 200)
tri_left = default_art_resize(tri_left_src.pull(env), *TRI_SIZE)
tri_down = default_art_resize(tri_down_src.pull(env), *TRI_SIZE)
tri_right = default_art_resize(tri_right_src.pull(env), *TRI_SIZE)
tri_up = default_art_resize(tri_up_src.pull(env), *TRI_SIZE)
# load inner image
inner = inner_src.pull(env)
resized_inner = default_art_resize(inner, 620, 620)
# composite this icon
icon = new_art.pull()
align_paste(
icon,
resized_inner,
art_anchor_to_offset(icon, HorizontalAnchor.Center, VerticalAnchor.Center),
art_anchor_to_offset(
resized_inner, HorizontalAnchor.Center, VerticalAnchor.Center
),
)
tri_rect = Rectangle.from_margin_rect(VART_HW, VART_HW, 100, 0, 100, 0)
align_alpha_composite(
icon,
tri_right,
anchor_to_offset(
tri_rect.width,
tri_rect.height,
HorizontalAnchor.Left,
VerticalAnchor.Center,
)
+ tri_rect.pos1,
art_anchor_to_offset(tri_right, HorizontalAnchor.Left, VerticalAnchor.Center),
)
align_alpha_composite(
icon,
tri_left,
anchor_to_offset(
tri_rect.width,
tri_rect.height,
HorizontalAnchor.Right,
VerticalAnchor.Center,
)
+ tri_rect.pos1,
art_anchor_to_offset(tri_left, HorizontalAnchor.Right, VerticalAnchor.Center),
)
align_alpha_composite(
icon,
tri_down,
anchor_to_offset(
tri_rect.width, tri_rect.height, HorizontalAnchor.Center, VerticalAnchor.Top
)
+ tri_rect.pos1,
art_anchor_to_offset(tri_down, HorizontalAnchor.Center, VerticalAnchor.Top),
)
align_alpha_composite(
icon,
tri_up,
anchor_to_offset(
tri_rect.width,
tri_rect.height,
HorizontalAnchor.Center,
VerticalAnchor.Bottom,
)
+ tri_rect.pos1,
art_anchor_to_offset(tri_up, HorizontalAnchor.Center, VerticalAnchor.Bottom),
)
# save it
fd_sink.push(env, icon)
@@ -51,6 +51,14 @@ def register(ctx: AuroraContext) -> None:
), ),
build_magnifying_glass_icon, build_magnifying_glass_icon,
) )
ctx.register(
"component/monitor",
(
SvgSource("component", "monitor.svg"),
TempArtSink("component", "monitor.png"),
),
build_generic_background,
)
def build_generic_background( def build_generic_background(
@@ -122,3 +130,9 @@ def build_magnifying_glass_icon(
env: AuroraEnvironment, src: BlenderSource, sink: TempArtSink env: AuroraEnvironment, src: BlenderSource, sink: TempArtSink
) -> None: ) -> None:
src.pull_to_temp(env, sink) src.pull_to_temp(env, sink)
def build_monitor_icon(
env: AuroraEnvironment, src: SvgSource, sink: TempArtSink
) -> None:
src.pull_to_temp(env, sink)