Skip to content

Commit

Permalink
Full round support, lib cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste Fouques committed Nov 18, 2016
1 parent d854fa9 commit ff440a9
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 154 deletions.
37 changes: 0 additions & 37 deletions appinfo.json

This file was deleted.

82 changes: 62 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,72 @@
{
"name": "pebble-engineering-steps",
"version": "1.0.0",
"description": "A fork of pebble-engineering by nguyer that incorporates Pebble Health steps.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"version": "2.0.0",
"license": "GPL",
"author": "Baptiste Fouques",
"description": "A shadowed fork of pebble-engineering by nguyer",
"bugs": {
"url": "https://github.com/bateast/pebble-engineering/issues"
},
"private": true,
"repository": {
"type": "git",
"url": "git+https://github.com/kencaron/pebble-engineering.git"
"url": "git+https://github.com/bateast/pebble-engineering.git",
"type": "git"
},
"author": "Ken Caron",
"license": "ISC",
"bugs": {
"url": "https://github.com/kencaron/pebble-engineering/issues"
"dependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"homepage": "https://github.com/kencaron/pebble-engineering#readme",
"keywords": [
"pebble-app"
],
"devDependencies": {
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-debug": "^2.1.2",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "^1.2.0",
"gulp-uglify": "^1.5.2",
"jshint": "^2.9.1",
"gulp-load-plugins": "^1.2.0",
"slate": "https://github.com/pebble/slate.git",
"jshint-stylish": "^2.1.0",
"slate": "https://[email protected]:pebble/slate.git"
}
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-debug": "^2.1.2",
"jshint": "^2.9.1"
},
"pebble": {
"sdkVersion": "3",
"resources": {
"media": []
},
"projectType": "native",
"uuid": "3f2fc7bd-fe40-465f-96fb-9ddf40c6e1f3",
"messageKeys": {
"SHOW_NUMBERS": 1,
"COLOR_MINUTE_MARKS": 9,
"COLOR_SECOND_HAND": 12,
"TEMPERATURE": 0,
"COLOR_MINUTE_HAND": 11,
"SHOW_DATE": 3,
"SHOW_SECOND_HAND": 2,
"COLOR_HOUR_HAND": 10,
"COLOR_BACKGROUND": 6,
"COLOR_LABEL": 7,
"SHOW_TEMPERATURE": 4,
"SHOW_STEPS": 5,
"COLOR_HOUR_MARKS": 8
},
"enableMultiJS": false,
"displayName": "Engineering-shadow",
"watchapp": {
"onlyShownOnCommunication": false,
"hiddenApp": false,
"watchface": true
},
"targetPlatforms": [
"basalt", "chalk"
],
"capabilities": [
"health",
"configurable"
]
},
"main": "index.js",
"homepage": "https://github.com/bateast/pebble-engineering/",
"name": "pebble-engineering-shadow"
}
7 changes: 4 additions & 3 deletions src/engineering.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int32_t get_angle_for_minute(int hour) {

static void bg_update_proc(Layer *layer, GContext *ctx) {
GRect bounds = layer_get_bounds(layer);
GRect frame = grect_inset(bounds, GEdgeInsets(4 * INSET));
GRect frame = bounds; /////// grect_inset(bounds, GEdgeInsets(4 * INSET));
GRect inner_hour_frame = grect_inset(bounds, GEdgeInsets((4 * INSET) + 8));
GRect inner_minute_frame = grect_inset(bounds, GEdgeInsets((4 * INSET) + 6));

Expand Down Expand Up @@ -393,11 +393,12 @@ static void hands_update_proc(Layer *layer, GContext *ctx) {
if (b_show_date) {
graphics_context_set_text_color(ctx, gcolor_numbers);
int offset = !b_show_numbers * 10;
const GRect date_rect = PBL_IF_RECT_ELSE(GRect(80, 75, 40 + offset, 14), GRect(100, 78, 45 + offset, 14));
const GRect date_rect = (GRect){.origin = (GPoint){.x = bounds.size.w / 2 + 10, .y = bounds.size.h / 2 - PBL_IF_RECT_ELSE(14, 18) / 2},
.size = (GSize){.w = PBL_IF_RECT_ELSE(40, 45) + offset, .h = PBL_IF_RECT_ELSE(14, 18)}};
graphics_draw_text(ctx, s_date_buffer, fonts_get_system_font(PBL_IF_RECT_ELSE(FONT_KEY_GOTHIC_14, FONT_KEY_GOTHIC_18)), date_rect, GTextOverflowModeWordWrap, GTextAlignmentCenter, NULL);
switch_to_shadow_ctx (ctx);{
graphics_context_set_fill_color(ctx, gcolor (shadow_date_box));
graphics_fill_rect(ctx, grect_inset (date_rect, GEdgeInsets(0,-1,-3)), 0, GCornerNone);
graphics_fill_rect(ctx, grect_inset (date_rect, GEdgeInsets(0,-1,PBL_IF_RECT_ELSE(-3, -4))), 0, GCornerNone);
}revert_to_fb_ctx (ctx);
}

Expand Down
Loading

0 comments on commit ff440a9

Please sign in to comment.