Changeset 1769693 in mainline for uspace/lib/ui/src/resource.c
- Timestamp:
- 2020-10-19T20:17:11Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ba09d06
- Parents:
- de9992c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/resource.c
rde9992c r1769693 64 64 gfx_color_t *btn_highlight_color = NULL; 65 65 gfx_color_t *btn_shadow_color = NULL; 66 gfx_color_t *wnd_face_color = NULL; 67 gfx_color_t *wnd_text_color = NULL; 68 gfx_color_t *wnd_frame_hi_color = NULL; 69 gfx_color_t *wnd_frame_sh_color = NULL; 70 gfx_color_t *wnd_highlight_color = NULL; 71 gfx_color_t *wnd_shadow_color = NULL; 72 gfx_color_t *tbar_act_bg_color = NULL; 73 gfx_color_t *tbar_inact_bg_color = NULL; 74 gfx_color_t *tbar_act_text_color = NULL; 75 gfx_color_t *tbar_inact_text_color = NULL; 66 76 errno_t rc; 67 77 … … 105 115 goto error; 106 116 117 rc = gfx_color_new_rgb_i16(0xc8c8, 0xc8c8, 0xc8c8, &wnd_face_color); 118 if (rc != EOK) 119 goto error; 120 121 rc = gfx_color_new_rgb_i16(0, 0, 0, &wnd_text_color); 122 if (rc != EOK) 123 goto error; 124 125 rc = gfx_color_new_rgb_i16(0x8888, 0x8888, 0x8888, &wnd_frame_hi_color); 126 if (rc != EOK) 127 goto error; 128 129 rc = gfx_color_new_rgb_i16(0, 0, 0, &wnd_frame_sh_color); 130 if (rc != EOK) 131 goto error; 132 133 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, 134 &wnd_highlight_color); 135 if (rc != EOK) 136 goto error; 137 138 rc = gfx_color_new_rgb_i16(0x8888, 0x8888, 0x8888, &wnd_shadow_color); 139 if (rc != EOK) 140 goto error; 141 142 rc = gfx_color_new_rgb_i16(0x5858, 0x6a6a, 0xc4c4, &tbar_act_bg_color); 143 if (rc != EOK) 144 goto error; 145 146 rc = gfx_color_new_rgb_i16(0xffff, 0xffff, 0xffff, 147 &tbar_act_text_color); 148 if (rc != EOK) 149 goto error; 150 151 rc = gfx_color_new_rgb_i16(0xdddd, 0xdddd, 0xdddd, 152 &tbar_inact_bg_color); 153 if (rc != EOK) 154 goto error; 155 156 rc = gfx_color_new_rgb_i16(0x5858, 0x5858, 0x5858, 157 &tbar_inact_text_color); 158 if (rc != EOK) 159 goto error; 160 107 161 resource->gc = gc; 108 162 resource->tface = tface; 109 163 resource->font = font; 164 110 165 resource->btn_frame_color = btn_frame_color; 111 166 resource->btn_face_color = btn_face_color; … … 113 168 resource->btn_highlight_color = btn_highlight_color; 114 169 resource->btn_shadow_color = btn_shadow_color; 170 171 resource->wnd_face_color = wnd_face_color; 172 resource->wnd_text_color = wnd_text_color; 173 resource->wnd_frame_hi_color = wnd_frame_hi_color; 174 resource->wnd_frame_sh_color = wnd_frame_sh_color; 175 resource->wnd_highlight_color = wnd_highlight_color; 176 resource->wnd_shadow_color = wnd_shadow_color; 177 178 resource->tbar_act_bg_color = tbar_act_bg_color; 179 resource->tbar_act_text_color = tbar_act_text_color; 180 resource->tbar_inact_bg_color = tbar_inact_bg_color; 181 resource->tbar_inact_text_color = tbar_inact_text_color; 182 115 183 *rresource = resource; 116 184 return EOK; … … 126 194 if (btn_shadow_color != NULL) 127 195 gfx_color_delete(btn_shadow_color); 196 197 if (wnd_face_color != NULL) 198 gfx_color_delete(wnd_face_color); 199 if (wnd_text_color != NULL) 200 gfx_color_delete(wnd_text_color); 201 if (wnd_frame_hi_color != NULL) 202 gfx_color_delete(wnd_frame_hi_color); 203 if (wnd_frame_sh_color != NULL) 204 gfx_color_delete(wnd_frame_sh_color); 205 if (wnd_highlight_color != NULL) 206 gfx_color_delete(wnd_highlight_color); 207 if (wnd_shadow_color != NULL) 208 gfx_color_delete(wnd_shadow_color); 209 210 if (tbar_act_bg_color != NULL) 211 gfx_color_delete(tbar_act_bg_color); 212 if (tbar_act_text_color != NULL) 213 gfx_color_delete(tbar_act_text_color); 214 if (tbar_inact_bg_color != NULL) 215 gfx_color_delete(tbar_inact_bg_color); 216 if (tbar_inact_text_color != NULL) 217 gfx_color_delete(tbar_inact_text_color); 218 128 219 if (tface != NULL) 129 220 gfx_typeface_destroy(tface); … … 147 238 gfx_color_delete(resource->btn_shadow_color); 148 239 240 gfx_color_delete(resource->wnd_face_color); 241 gfx_color_delete(resource->wnd_text_color); 242 gfx_color_delete(resource->wnd_frame_hi_color); 243 gfx_color_delete(resource->wnd_frame_sh_color); 244 gfx_color_delete(resource->wnd_highlight_color); 245 gfx_color_delete(resource->wnd_shadow_color); 246 247 gfx_color_delete(resource->tbar_act_bg_color); 248 gfx_color_delete(resource->tbar_act_text_color); 249 gfx_color_delete(resource->tbar_inact_bg_color); 250 gfx_color_delete(resource->tbar_inact_text_color); 251 149 252 gfx_font_close(resource->font); 150 253 gfx_typeface_destroy(resource->tface);
Note:
See TracChangeset
for help on using the changeset viewer.