diff --git a/package.json b/package.json index d63f424..51377db 100644 --- a/package.json +++ b/package.json @@ -61,9 +61,8 @@ "type": "font" }, { - "characterRegex": "[0-9 a-z A-Z]", "file": "fonts/Gotham Light.otf", - "name": "FONT_GLIGHT_12", + "name": "FONT_GLIGHT_10", "targetPlatforms": null, "type": "font" }, @@ -74,22 +73,23 @@ "type": "font" }, { + "characterRegex": "[0-9 a-z A-Z]", "file": "fonts/Gotham Light.otf", - "name": "FONT_GLIGHT_10", + "name": "FONT_GLIGHT_12", "targetPlatforms": null, "type": "font" }, { "characterRegex": "[0-9:]", "file": "fonts/Gotham Bold.otf", - "name": "FONT_GBOLD_22", + "name": "FONT_GBOLD_34", "targetPlatforms": null, "type": "font" }, { "characterRegex": "[0-9:]", "file": "fonts/Gotham Bold.otf", - "name": "FONT_GBOLD_34", + "name": "FONT_GBOLD_22", "targetPlatforms": null, "type": "font" }, @@ -111,5 +111,5 @@ "watchface": true } }, - "version": "6.1.0" + "version": "6.2.0" } diff --git a/src/c/main.c b/src/c/main.c index ec27593..2492607 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -82,14 +82,6 @@ static int xdaterect(bool is24, GRect hourect, GRect inner, GRect minrect){ } else return hourect.origin.x + hourect.size.w + 1; } -static GRect LineforMin(GRect DotYes,GRect DotNo){ - if (settings.DisplayDots){ - return DotYes; - } - else { - return DotNo; - } -} static GColor ColorSelect(GColor ColorDay, GColor ColorNight){ if (settings.NightTheme && settings.IsNightNow ){ return ColorNight; @@ -147,7 +139,7 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ graphics_fill_rect(ctx, bounds, 0, GCornersAll); GRect frame = grect_inset(bounds, GEdgeInsets(7)); GRect inner = grect_inset(frame, GEdgeInsets(12)); - GRect inner2 = grect_inset(frame, GEdgeInsets(4)); + GRect inner2 = grect_inset(frame, GEdgeInsets(6)); int minute_angle = get_angle_for_minutes(s_minutes); GRect minrect_init = grect_centered_from_polar(inner, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(minute_angle), GSize(36, 28)); GRect minrect = GRect(minrect_init.origin.x + offset, @@ -159,7 +151,7 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ 0, GSize(50, 42) ); - GRect hourect_mix = grect_centered_from_polar(GRect(bounds.size.h / 2, bounds.size.w / 2, 0, 0), + GRect mininit_rect = grect_centered_from_polar(GRect(bounds.size.h / 2, bounds.size.w / 2, 0, 0), GOvalScaleModeFitCircle, 0, GSize(55, 44) @@ -187,7 +179,6 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ // Clock Mode: Analogic - Hour and Minute else if (settings.ClockMode==2){ GPoint p_center = GPoint(bounds.size.w / 2, bounds.size.h / 2); - GPoint p_minute= gpoint_from_polar(LineforMin(inner, inner2), GOvalScaleModeFitCircle,DEG_TO_TRIGANGLE((s_minutes*360)/60)); //angle hour int anglehour = (360 * (s_hours % 12) / 12)+(30 * s_minutes / 60); GPoint p_hour = gpoint_from_polar(grect_inset(inner, GEdgeInsets(25)), GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE(anglehour)); @@ -202,7 +193,14 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ graphics_context_set_fill_color(ctx,ColorSelect( settings.MinColor, settings.MinColorNight)); graphics_fill_circle(ctx, p_center, 2); graphics_context_set_stroke_width(ctx, 4); - graphics_draw_line(ctx, p_center, p_minute); + if (settings.DisplayDots){ + GPoint p_minute = gpoint_from_polar(inner, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, p_center, p_minute); + } + else { + GPoint p_minute = gpoint_from_polar(inner2, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, p_center, p_minute); + } } //Dual Mode else if (settings.ClockMode==3){ @@ -226,11 +224,16 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ graphics_context_set_stroke_width(ctx, 8); //Minute GPoint mininit3=gpoint_from_polar(digmixed, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); - GPoint minfin3= gpoint_from_polar(LineforMin(inner, inner2), GOvalScaleModeFitCircle,DEG_TO_TRIGANGLE((s_minutes*360)/60)); graphics_context_set_stroke_color(ctx, ColorSelect( settings.MinColor, settings.MinColorNight)); graphics_context_set_stroke_width(ctx, 4); - graphics_draw_line(ctx, mininit3, minfin3); - graphics_context_set_stroke_width(ctx, 3); + if (settings.DisplayDots){ + GPoint p_minute = gpoint_from_polar(inner, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, mininit3, p_minute); + } + else { + GPoint p_minute = gpoint_from_polar(inner2, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, mininit3, p_minute); + } //Digital char hournow3[4]; int hourtorect3 = hourtodraw(clock_is_24h_style(), s_hours); @@ -239,23 +242,28 @@ static void layer_update_proc(Layer * layer, GContext * ctx){ char minutenow[4]; snprintf(minutenow, sizeof(minutenow), "%02d", s_minutes); graphics_draw_text(ctx, minutenow, FontMinute, minmixed, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL); - } - //Mix Mode - else if (settings.ClockMode==4){ - // Minute - GPoint p_min_init=gpoint_from_polar(hourect_mix, GOvalScaleModeFillCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); - graphics_context_set_stroke_color(ctx, ColorSelect( settings.MinColor, settings.MinColorNight)); - graphics_context_set_stroke_width(ctx, 4); - GPoint p_minute= gpoint_from_polar(LineforMin(inner, inner2), GOvalScaleModeFitCircle,DEG_TO_TRIGANGLE((s_minutes*360)/60)); - graphics_draw_line(ctx, p_min_init, p_minute); - - // Create hour display - char hournow[4]; - int hourtorect = hourtodraw(clock_is_24h_style(), s_hours); - snprintf(hournow, sizeof(hournow), "%02d", hourtorect); - GRect top_hourect =hourect_mix; - graphics_draw_text(ctx, hournow,FontHour,top_hourect,GTextOverflowModeFill, GTextAlignmentCenter, NULL); } + else if (settings.ClockMode==4){ + GRect top_hourect = mininit_rect; + // Minute + GPoint p_min_init=gpoint_from_polar(top_hourect, GOvalScaleModeFillCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_context_set_stroke_color(ctx, ColorSelect( settings.MinColor, settings.MinColorNight)); + graphics_context_set_stroke_width(ctx, 4); + if (settings.DisplayDots){ + GPoint p_minute = gpoint_from_polar(inner, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, p_min_init, p_minute); + } + else { + GPoint p_minute = gpoint_from_polar(inner2, GOvalScaleModeFitCircle, DEG_TO_TRIGANGLE((s_minutes*360)/60)); + graphics_draw_line(ctx, p_min_init, p_minute); + } + + // Create hour display + char hournow[4]; + int hourtorect = hourtodraw(clock_is_24h_style(), s_hours); + snprintf(hournow, sizeof(hournow), "%02d", hourtorect); + graphics_draw_text(ctx, hournow,FontHour,top_hourect,GTextOverflowModeFill, GTextAlignmentCenter, NULL); + } // Complications int offsetmix; if (settings.ClockMode==3){ diff --git a/src/pkjs/config.js b/src/pkjs/config.js index e4e0b12..67275e6 100644 --- a/src/pkjs/config.js +++ b/src/pkjs/config.js @@ -239,16 +239,17 @@ module.exports = [ }, { "type": "heading", - "defaultValue": "version v6.1", + "defaultValue":"Donate via PayPal (0.99€)", "size":6 - }, + }, { "type": "heading", - "defaultValue": "Made in Madrid, Spain", + "defaultValue": "version v6.2", "size":6 }, { - "type": "text", - "defaultValue":"" + "type": "heading", + "defaultValue": "Made in Madrid, Spain", + "size":6 } ]; \ No newline at end of file