Commit Graph

12 Commits

Author SHA1 Message Date
Tom A. Wagner
b9929ba776 Run rustfmt 2023-09-19 08:27:11 +02:00
Tom A. Wagner
89f417f260 node: Remove transparency in dark mode, improve contrast to graphview in light mode 2023-08-28 20:58:54 +02:00
Tom A. Wagner
4ed7e1f4be graph: Redesign nodes and ports
Nodes now have a background using the libadwaita .card style class.

Ports now have a circular handle, which is positioned on the edge of the node so that half of the circle sticks out.
Ports are also no longer themed like a button and don't receive a color based on the guessed media type, in a future commit,
the handle will be colored instead.
2023-08-28 20:58:54 +02:00
Tom A. Wagner
af4051c3c2 ui: Port to libadwaita
This ports the application to libadwaita, enabling us to use the libadwaita stylesheet and
widgets to better implement the Gnome Human Interface Guidelines.
2023-08-28 19:47:37 +02:00
Tom A. Wagner
7f754b207c Color links and ports according to their formats
Format params for links and ports are now being watched for in the pipewire connection code.

The parsed media type is then set on the port widget / link object
and they are colored accordingly.

For ports, which were already colored before, this new method of determining the media type
should be more reliable and accurate as this uses the real Format/EnumFormat
params instead of parsing optional properties.
2023-08-20 10:55:25 +02:00
Tom A. Wagner
bf5c7e4636 Update dependencies 2023-08-17 20:14:23 +02:00
Tom A. Wagner
7145c83ae1 graph: Draw "fake" link during port drag-and-drop to visualize link creating
Cursor movement during port drag-and-drop on the graph is now being tracked
and a link is drawn from the dragged port to the cursor.

If the cursor is hovering a port the source port can link to,
the second end of the link instead attaches to the ports link anchor
so that the link "snaps" to the linkable port.
2023-08-04 14:58:05 +02:00
Tom A. Wagner
15df88a0af graph: Move port link anchor calculation into port widget 2023-08-03 21:12:15 +02:00
Tom A. Wagner
0b3b124cdf graph: Refactor graph item management into new graph_manager object
The graph widgets management (watching a glib receiver, adding and removing
Nodes, Ports and Links) currently done in the `Application` and `GraphView`
objects has been extracted into a new GraphManager object, which watches the
receiver instead, pushes changes directly to the widgets, and reacts to their signals.

This seperates widget logic and management logic cleanly instead of both
being mixed into the GraphView, and also reduces the code size for the
Application object.
2023-08-01 09:15:40 +02:00
Tom A. Wagner
a9ad1cccf0 fix clippy warnings 2023-08-01 09:13:16 +02:00
Tom A. Wagner
f986902929 graph: Move link data into new GObject subclass 2023-07-27 14:16:42 +02:00
Tom A. Wagner
475a83fab7 Restructure view module into ui folder, graph specific widgets into graph subfolder 2023-07-27 14:16:42 +02:00