3snowp7im / urn

Split tracker / timer with GTK+ frontend
GNU General Public License v3.0
126 stars 36 forks source link

Adding icons to Timer CSS layouts. #52

Open alkaris2 opened 3 years ago

alkaris2 commented 3 years ago

As title states, should to be able to add icons to splits from CSS layouts by pointing to an image directory for the themes and then self-define the icon names for the JSON file, ie;

CSS Theme file could be using

/* Match class with name "icon" in its name */
[class^="icon"] {
  width: 50px;
  height: 50px;
  position: relative;
  top: 15px;
  margin-right: 10px;
  fill: #000;
  background-repeat: no-repeat;
}

and JSON file could also have

{
  "title": "<game_title_here> Any%",
  "attempt_count": 74,
  "splits": [
    {
      "icons": "../images/icon_1.png",
      "title": "<split_name>",
      "time": "12:12:59.927",
      "best_time": "12:12:59.927",
      "best_segment": "12:12:59.927"
    }
  ],
  "width": 318,
  "height": 282
}