<p><a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> I mostly implemented this for things like <code>indicator_error</code> (<a href="https://github.com/geany/geany/pull/1185" class="issue-link js-issue-link" data-url="https://github.com/geany/geany/issues/1185" data-id="172319890" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#1185</a>), not as a generic theme inheritance thing.  And there, using the <code>default</code> style would not be very nice.</p>

<p><a href="https://github.com/elextr" class="user-mention">@elextr</a> I though about implementing proper theme inheritance, but it's a lot less trivial indeed.  I first tried the naive way just like this here but with an additional <code>[theme_info]</code> <code>inherits</code> key, and while it worked as expected, it wasn't really nice at any level.  It only handled the <code>named_styles</code> part, and not <code>named_colors</code>, and I have no real idea in what order this is resolved so it might not even have worked properly.  BTW, my idea behind this was mostly allowing users to override a small thing in a theme without having to maintain a whole "fork" of it.</p>

<p>We probably should rather do something like in filetypes files, and allow</p>

<div class="highlight highlight-source-ini"><pre><span class="pl-c"># inherit colors from Fluffy</span>
<span class="pl-en">[named_colors=fluffy]</span>
<span class="pl-c"># override some</span>
<span class="pl-k">red</span>=<span class="pl-c">#ff0000</span>

<span class="pl-c"># let's be crazy, we inherit something totally different -- which doesn't really make sense, but whatever</span>
<span class="pl-en">[named_styles=inkpot]</span>
<span class="pl-c"># and override some</span>
<span class="pl-k">comment</span>=red,<span class="pl-c">#000</span></pre></div>

<p>Or wait to come up with a way to support all what <a href="https://github.com/codebrainz" class="user-mention">@codebrainz</a> wishes for.<br>
But IMO full inheritance, while nice, is slightly off-topic here and would deserve its won issue :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/1186#issuecomment-241376957">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ3Ta7RAK9GteZBfHkixq_sQ4apeAks5qiX2vgaJpZM4JpZUZ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ5bLqPfLMSddTqbpHfvIuqx44htbks5qiX2vgaJpZM4JpZUZ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1186#issuecomment-241376957"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n in #1186: @codebrainz I mostly implemented this for things like `indicator_error` (#1185), not as a generic theme inheritance thing.  And there, using the `default` style would not be very nice.\r\n\r\n@elextr I though about implementing proper theme inheritance, but it's a lot less trivial indeed.  I first tried the naive way just like this here but with an additional `[theme_info]` `inherits` key, and while it worked as expected, it wasn't really nice at any level.  It only handled the `named_styles` part, and not `named_colors`, and I have no real idea in what order this is resolved so it might not even have worked properly.  BTW, my idea behind this was mostly allowing users to override a small thing in a theme without having to maintain a whole \"fork\" of it.\r\n\r\nWe probably should rather do something like in filetypes files, and allow\r\n```ini\r\n# inherit colors from Fluffy\r\n[named_colors=fluffy]\r\n# override some\r\nred=#ff0000\r\n\r\n# let's be crazy, we inherit something totally different -- which doesn't really make sense, but whatever\r\n[named_styles=inkpot]\r\n# and override some\r\ncomment=red,#000\r\n```\r\n\r\nOr wait to come up with a way to support all what @codebrainz wishes for.\r\nBut IMO full inheritance, while nice, is slightly off-topic here and would deserve its won issue :)"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1186#issuecomment-241376957"}}}</script>