kopia lustrzana https://gitlab.com/Zwarf/picplanner
Further UI improvements, switch version to 0.2.0
Preparing Flatpak release 0.2.0merge-requests/3/merge
rodzic
f3b1967c34
commit
226772e0d9
|
@ -1,2 +1,6 @@
|
|||
Version 0.1:
|
||||
- First official release
|
||||
Version 0.1.0:
|
||||
- First official release
|
||||
|
||||
Version 0.2.0:
|
||||
- Improve UI to fit better on mobile devices
|
||||
- UI bug fixes
|
|
@ -11,4 +11,8 @@ Files: data/icons/pin.svg
|
|||
data/icons/milky-way-symbolic.svg
|
||||
data/icons/milky-way-color.svg
|
||||
Copyright: 2022 Rajdeep Singha <rajdeepsingha@proton.me>
|
||||
License: GPL-3+
|
||||
|
||||
Files: data/icons/map-symbolic.svg
|
||||
Copyright: GNOME
|
||||
License: GPL-3+
|
|
@ -81,7 +81,17 @@
|
|||
</requires>
|
||||
|
||||
<releases>
|
||||
<release date="2022-07-20" version="0.1">
|
||||
<release date="2022-09-05" version="0.2.0">
|
||||
<description>
|
||||
<p>
|
||||
<ul>
|
||||
<li>Improve UI to fit better on mobile devices</li>
|
||||
<li>UI bug fixes</li>
|
||||
</ul>
|
||||
</p>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2022-07-20" version="0.1.0">
|
||||
<description>
|
||||
<p>
|
||||
First official release.
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 15 2 v 10 l -5 3 l -5 -3 l -5 3 v -10 l 5 -3 l 5 3 z m -10 1 v 8 l 5 3 v -8 z m 0 0" fill="#222222"/></svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 245 B |
|
@ -52,3 +52,7 @@ install_data(
|
|||
'elevation-symbolic.svg',
|
||||
install_dir: join_paths(get_option('datadir'), 'icons')
|
||||
)
|
||||
install_data(
|
||||
'map-symbolic.svg',
|
||||
install_dir: join_paths(get_option('datadir'), 'icons')
|
||||
)
|
|
@ -1,5 +1,5 @@
|
|||
project('picplanner', 'c',
|
||||
version: '0.1.0',
|
||||
version: '0.2.0',
|
||||
meson_version: '>= 0.50.0',
|
||||
default_options: [ 'warning_level=2',
|
||||
'c_std=gnu11',
|
||||
|
|
|
@ -250,6 +250,7 @@ picplanner_draw_layer_snapshot (GtkWidget *widget,
|
|||
cr = gtk_snapshot_append_cairo (snapshot, &GRAPHENE_RECT_INIT(0, 0, width, height));
|
||||
|
||||
cairo_set_line_join (cr, CAIRO_LINE_JOIN_BEVEL);
|
||||
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
|
||||
|
||||
for (uint i = 0; i < priv->nodes_len; i++)
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ picplanner_application_show_about (GSimpleAction *action,
|
|||
gtk_show_about_dialog (window,
|
||||
"logo-icon-name", "de.zwarf.picplanner",
|
||||
"program-name", "PicPlanner",
|
||||
"version", "0.1.0",
|
||||
"version", "0.2.0",
|
||||
"comments", "Plan your photographs",
|
||||
"website", "https://gitlab.com/Zwarf/picplanner",
|
||||
"copyright", copyright,
|
||||
|
|
|
@ -19,5 +19,6 @@
|
|||
<file alias="milky-way-symbolic.svg">../data/icons/milky-way-symbolic.svg</file>
|
||||
<file alias="azimuth-symbolic.svg">../data/icons/azimuth-symbolic.svg</file>
|
||||
<file alias="elevation-symbolic.svg">../data/icons/elevation-symbolic.svg</file>
|
||||
<file alias="map-symbolic.svg">../data/icons/map-symbolic.svg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
|
|
@ -41,6 +41,8 @@ struct _PicplannerOverview
|
|||
{
|
||||
GtkBox parent_instance;
|
||||
|
||||
GtkWidget *basic_information;
|
||||
|
||||
GtkWidget *switch_sun;
|
||||
GtkWidget *switch_moon;
|
||||
GtkWidget *switch_milky_way;
|
||||
|
@ -82,19 +84,12 @@ struct _PicplannerOverview
|
|||
|
||||
G_DEFINE_TYPE (PicplannerOverview, picplanner_overview, GTK_TYPE_BOX)
|
||||
|
||||
/*
|
||||
* Emit a signal after a user input.
|
||||
* The picplanner-window is waiting for this signal to recalculate the positions
|
||||
* of sun, moon and milky way.
|
||||
*/
|
||||
static void
|
||||
emit_signal_changed (GtkWidget *self,
|
||||
gpointer overview_user_input)
|
||||
|
||||
void
|
||||
picplanner_overview_map_fullscreen (PicplannerOverview *overview,
|
||||
gboolean toggle)
|
||||
{
|
||||
(void) self;
|
||||
PicplannerOverview *overview;
|
||||
overview = PICPLANNER_OVERVIEW (overview_user_input);
|
||||
g_signal_emit (overview, signal_input_changed, 0, NULL);
|
||||
gtk_widget_set_visible (overview->basic_information, toggle);
|
||||
}
|
||||
|
||||
|
||||
|
@ -672,11 +667,6 @@ picplanner_overview_init (PicplannerOverview *overview)
|
|||
* values above.
|
||||
*/
|
||||
|
||||
g_signal_connect (G_OBJECT (overview->viewport),
|
||||
"notify::zoom-level",
|
||||
G_CALLBACK (emit_signal_changed),
|
||||
overview);
|
||||
|
||||
g_signal_connect (G_OBJECT (overview->settings),
|
||||
"changed::map-unit-metric",
|
||||
G_CALLBACK (shumate_map_metric_imperial_scale),
|
||||
|
@ -712,6 +702,7 @@ picplanner_overview_class_init (PicplannerOverviewClass *class)
|
|||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_azimuth_sun);
|
||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_azimuth_moon);
|
||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, label_azimuth_milky_way);
|
||||
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (class), PicplannerOverview, basic_information);
|
||||
|
||||
/*
|
||||
* Define the signal that is emitted if the user makes an input.
|
||||
|
|
|
@ -29,6 +29,10 @@ G_DECLARE_FINAL_TYPE (PicplannerOverview, picplanner_overview, PICPLANNER, OVERV
|
|||
PicplannerOverview
|
||||
*picplanner_overview_new ();
|
||||
|
||||
void
|
||||
picplanner_overview_map_fullscreen (PicplannerOverview *overview,
|
||||
gboolean toggle);
|
||||
|
||||
void
|
||||
picplanner_overview_set_current_coordinates_sun (PicplannerOverview *overview,
|
||||
double *array_coordinates_sun,
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<property name="orientation">vertical</property>
|
||||
|
||||
<child>
|
||||
<object class="AdwClamp">
|
||||
<object class="AdwClamp" id="basic_information">
|
||||
<property name="margin-top">8</property>
|
||||
<property name="margin-bottom">12</property>
|
||||
<property name="margin-start">12</property>
|
||||
|
|
|
@ -45,6 +45,7 @@ struct _PicplannerWindow
|
|||
GtkWidget *search_bar; /* Search bar for the location */
|
||||
GtkWidget *search_entry; /* The search entry inside the search bar */
|
||||
GtkWidget *search_button; /* The search button in the header bar so show the search bar */
|
||||
GtkWidget *map_button; /* The map button in the header bar to show the map fullscreen */
|
||||
GtkWidget *overview_box; /* The overview page */
|
||||
GtkWidget *sun_box; /* The sun page */
|
||||
GtkWidget *moon_box; /* The moon page */
|
||||
|
@ -52,6 +53,7 @@ struct _PicplannerWindow
|
|||
GtkWidget *north_entry; /* SpinButton for North coordinates */
|
||||
GtkWidget *east_entry; /* SpinButton for East coordinates */
|
||||
GtkWidget *clamp_time_selector;
|
||||
GtkWidget *overview_page;
|
||||
|
||||
/* Search functionality */
|
||||
GtkWidget *search_result_box; /* ListBox containing search results */
|
||||
|
@ -228,6 +230,34 @@ search_location (GtkWidget *self,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Show the map in fullscreen
|
||||
*/
|
||||
static void
|
||||
map_fullscreen (GtkToggleButton *self,
|
||||
PicplannerWindow *window)
|
||||
{
|
||||
(void) self;
|
||||
picplanner_overview_map_fullscreen (PICPLANNER_OVERVIEW (window->overview_box),!gtk_toggle_button_get_active (self));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Hide the map fullscreen button if the active view is not "page1" (overview)
|
||||
*/
|
||||
static void
|
||||
stack_changed (AdwViewStack *self,
|
||||
gpointer pspec,
|
||||
PicplannerWindow *window)
|
||||
{
|
||||
(void) pspec;
|
||||
if (!strcmp(adw_view_stack_get_visible_child_name (self),"page1"))
|
||||
gtk_widget_set_visible (window->map_button, TRUE);
|
||||
else
|
||||
gtk_widget_set_visible (window->map_button, FALSE);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Changing the date_time variable after a user input was recognized.
|
||||
* Afterwards, emit a signal to start the calculations.
|
||||
|
@ -650,6 +680,7 @@ picplanner_window_class_init (PicplannerWindowClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, search_bar);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, search_entry);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, search_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, map_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, overview_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, sun_box);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, moon_box);
|
||||
|
@ -665,6 +696,7 @@ picplanner_window_class_init (PicplannerWindowClass *klass)
|
|||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, calendar_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, spin_button_hour);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, spin_button_minute);
|
||||
gtk_widget_class_bind_template_child (widget_class, PicplannerWindow, overview_page);
|
||||
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, day_selected);
|
||||
|
@ -757,6 +789,15 @@ picplanner_window_init (PicplannerWindow *window)
|
|||
G_CALLBACK (day_selected),
|
||||
window);
|
||||
|
||||
g_signal_connect (G_OBJECT (window->map_button),
|
||||
"toggled",
|
||||
G_CALLBACK (map_fullscreen),
|
||||
window);
|
||||
|
||||
g_signal_connect (G_OBJECT (window->stack),
|
||||
"notify::visible-child",
|
||||
G_CALLBACK (stack_changed),
|
||||
window);
|
||||
|
||||
/*
|
||||
* Initialisation of values needed to detect when a user input ends
|
||||
|
|
|
@ -72,6 +72,11 @@
|
|||
<property name="icon-name">edit-find-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="start">
|
||||
<object class="GtkToggleButton" id="map_button">
|
||||
<property name="icon-name">map-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
<object class="GtkMenuButton">
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
|
@ -213,7 +218,7 @@
|
|||
<child>
|
||||
<object class="AdwPreferencesGroup">
|
||||
<child>
|
||||
<object class="AdwExpanderRow">
|
||||
<object class="AdwPreferencesRow">
|
||||
<property name="title">Date and Time</property>
|
||||
<property name="activatable">false</property>
|
||||
<child>
|
||||
|
|
Ładowanie…
Reference in New Issue