{"id":1017,"date":"2009-11-02T09:41:28","date_gmt":"2009-11-02T09:41:28","guid":{"rendered":"http:\/\/www.notmart.org\/index.php\/Graphics\/Easier_Plasma_themes_creation"},"modified":"2009-11-02T09:41:28","modified_gmt":"2009-11-02T09:41:28","slug":"easier_plasma_themes_creation","status":"publish","type":"post","link":"https:\/\/notmart.org\/blog\/2009\/11\/easier_plasma_themes_creation\/","title":{"rendered":"Easier Plasma themes creation"},"content":{"rendered":"<p>One pretty long task of plasma themes is to manually rename all the SVG sub elements with the proper names. Let&#8217;s say we want to theme a button, we will need a SVG file with the following elements: normal-top, normal-topleft, normal-left, normal-bottomleft, normal-bottom, normal-bottomright, normal-right, normal-topright and normal-center.<\/p>\n<p>This is for the button in normal status, then you need the same thing with active-, pressed- and focus- prefixes<\/p>\n<p>This makes Plasma themes quite powerful (and always looking pixel perfect) but it&#8217;s quite fainful to rename over a hundred of elements by hand<\/p>\n<p>Since usually the themes are designed in inkscape and it has a pretty neat system to write plugins in python, i&#8217;ve decided to write a little extension that eases the ain a lot: if you select 9 elements it will rename them with the usual topleft, left, top etc names, with an optional prefix asked by a dialog. If you select 4 items, it will instead rename them as hint-top-margin, hint-left-margin etc.<\/p>\n<p>The extension is located at <a href=\"http:\/\/websvn.kde.org\/trunk\/playground\/artwork\/Oxygen\/notmart\/inkscapeextensions\/\">this address<\/a>, to use it you have to copy those 2 files in the ~\/.inkscape\/extensions folder.<\/p>\n<p>Unfortunately it requires a recent snapshot of inkscape 0.47, since the python scripts used have some bugs.<\/p>\n<p>As usual a video is worth 1024 words \ud83d\ude42<\/p>\n<p><embed src=\"http:\/\/blip.tv\/play\/AYGshC8A\" type=\"application\/x-shockwave-flash\" width=\"536\" height=\"343\" allowscriptaccess=\"always\" allowfullscreen=\"true\"><\/embed><\/p>\n<p><a href=\"http:\/\/www.notmart.org\/misc\/inkscape-plasma.ogv\">Ogg version<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One pretty long task of plasma themes is to manually rename all the SVG sub elements with the proper names. Let&#8217;s say we want to theme a button, we will need a SVG file with the following elements: normal-top, normal-topleft, normal-left, normal-bottomleft, normal-bottom, normal-bottomright, normal-right, normal-topright and normal-center. This is for the button in normal [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[74,75,2,10,7],"class_list":["post-1017","post","type-post","status-publish","format-standard","hentry","category-graphics","tag-artwork","tag-inkscape","tag-kde","tag-kde4","tag-plasma"],"_links":{"self":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/1017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/comments?post=1017"}],"version-history":[{"count":0,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/posts\/1017\/revisions"}],"wp:attachment":[{"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/media?parent=1017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/categories?post=1017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notmart.org\/blog\/wp-json\/wp\/v2\/tags?post=1017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}