├── .nojekyll ├── CREDITS.md ├── LICENSE.md ├── NOTES.md ├── README.md ├── _coverpage.md ├── _media ├── color_picker.png ├── gtk_inspector.png ├── home_img_header.png ├── logo.png └── thumbnail.png ├── _sidebar.md ├── creating_gtk_themes.md ├── creating_icon_theme.md ├── custom.css ├── faq_gtk_themes.md_.md ├── further_reading.md ├── getting_started.md ├── index.html ├── index.md └── now.json /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/.nojekyll -------------------------------------------------------------------------------- /CREDITS.md: -------------------------------------------------------------------------------- 1 | 2 | # [Suraj Mandal](https://github.com/surajmandalcell) 3 | 4 | - Creating the docs 5 | - Content 6 | - Site 7 | 8 | # [Docsify](https://github.com/QingWei-Li/docsify) {docsify-ignore-all} 9 | Used to create the docs. 10 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | ``` 2 | GNU GENERAL PUBLIC LICENSE 3 | Version 3, 2018 Suraj Mandal 4 | 5 | Copyright (C) 2007 Suraj Mandal. 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The GNU General Public License is a free, copyleft license for 12 | software and other kinds of works. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | the GNU General Public License is intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. I, Suraj Mandal, use the 19 | GNU General Public License for most of our software; it applies also to 20 | any other work released this way by its authors. You can apply it to 21 | your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not 24 | price. Our General Public Licenses are designed to make sure that you 25 | have the freedom to distribute copies of free software (and charge for 26 | them if you wish), that you receive source code or can get it if you 27 | want it, that you can change the software or use pieces of it in new 28 | free programs, and that you know you can do these things. 29 | 30 | To protect your rights, we need to prevent others from denying you 31 | these rights or asking you to surrender the rights. Therefore, you have 32 | certain responsibilities if you distribute copies of the software, or if 33 | you modify it: responsibilities to respect the freedom of others. 34 | 35 | For example, if you distribute copies of such a program, whether 36 | gratis or for a fee, you must pass on to the recipients the same 37 | freedoms that you received. You must make sure that they, too, receive 38 | or can get the source code. And you must show them these terms so they 39 | know their rights. 40 | 41 | Developers that use the GNU GPL protect your rights with two steps: 42 | (1) assert copyright on the software, and (2) offer you this License 43 | giving you legal permission to copy, distribute and/or modify it. 44 | 45 | For the developers' and authors' protection, the GPL clearly explains 46 | that there is no warranty for this free software. For both users' and 47 | authors' sake, the GPL requires that modified versions be marked as 48 | changed, so that their problems will not be attributed erroneously to 49 | authors of previous versions. 50 | 51 | Some devices are designed to deny users access to install or run 52 | modified versions of the software inside them, although the manufacturer 53 | can do so. This is fundamentally incompatible with the aim of 54 | protecting users' freedom to change the software. The systematic 55 | pattern of such abuse occurs in the area of products for individuals to 56 | use, which is precisely where it is most unacceptable. Therefore, we 57 | have designed this version of the GPL to prohibit the practice for those 58 | products. If such problems arise substantially in other domains, we 59 | stand ready to extend this provision to those domains in future versions 60 | of the GPL, as needed to protect the freedom of users. 61 | 62 | Finally, every program is threatened constantly by software patents. 63 | States should not allow patents to restrict development and use of 64 | software on general-purpose computers, but in those that do, we wish to 65 | avoid the special danger that patents applied to a free program could 66 | make it effectively proprietary. To prevent this, the GPL assures that 67 | patents cannot be used to render the program non-free. 68 | 69 | The precise terms and conditions for copying, distribution and 70 | modification follow. 71 | 72 | TERMS AND CONDITIONS 73 | 74 | 0. Definitions. 75 | 76 | "This License" refers to version 3 of the GNU General Public License. 77 | 78 | "Copyright" also means copyright-like laws that apply to other kinds of 79 | works, such as semiconductor masks. 80 | 81 | "The Program" refers to any copyrightable work licensed under this 82 | License. Each licensee is addressed as "you". "Licensees" and 83 | "recipients" may be individuals or organizations. 84 | 85 | To "modify" a work means to copy from or adapt all or part of the work 86 | in a fashion requiring copyright permission, other than the making of an 87 | exact copy. The resulting work is called a "modified version" of the 88 | earlier work or a work "based on" the earlier work. 89 | 90 | A "covered work" means either the unmodified Program or a work based 91 | on the Program. 92 | 93 | To "propagate" a work means to do anything with it that, without 94 | permission, would make you directly or secondarily liable for 95 | infringement under applicable copyright law, except executing it on a 96 | computer or modifying a private copy. Propagation includes copying, 97 | distribution (with or without modification), making available to the 98 | public, and in some countries other activities as well. 99 | 100 | To "convey" a work means any kind of propagation that enables other 101 | parties to make or receive copies. Mere interaction with a user through 102 | a computer network, with no transfer of a copy, is not conveying. 103 | 104 | An interactive user interface displays "Appropriate Legal Notices" 105 | to the extent that it includes a convenient and prominently visible 106 | feature that (1) displays an appropriate copyright notice, and (2) 107 | tells the user that there is no warranty for the work (except to the 108 | extent that warranties are provided), that licensees may convey the 109 | work under this License, and how to view a copy of this License. If 110 | the interface presents a list of user commands or options, such as a 111 | menu, a prominent item in the list meets this criterion. 112 | 113 | 1. Source Code. 114 | 115 | The "source code" for a work means the preferred form of the work 116 | for making modifications to it. "Object code" means any non-source 117 | form of a work. 118 | 119 | A "Standard Interface" means an interface that either is an official 120 | standard defined by a recognized standards body, or, in the case of 121 | interfaces specified for a particular programming language, one that 122 | is widely used among developers working in that language. 123 | 124 | The "System Libraries" of an executable work include anything, other 125 | than the work as a whole, that (a) is included in the normal form of 126 | packaging a Major Component, but which is not part of that Major 127 | Component, and (b) serves only to enable use of the work with that 128 | Major Component, or to implement a Standard Interface for which an 129 | implementation is available to the public in source code form. A 130 | "Major Component", in this context, means a major essential component 131 | (kernel, window system, and so on) of the specific operating system 132 | (if any) on which the executable work runs, or a compiler used to 133 | produce the work, or an object code interpreter used to run it. 134 | 135 | The "Corresponding Source" for a work in object code form means all 136 | the source code needed to generate, install, and (for an executable 137 | work) run the object code and to modify the work, including scripts to 138 | control those activities. However, it does not include the work's 139 | System Libraries, or general-purpose tools or generally available free 140 | programs which are used unmodified in performing those activities but 141 | which are not part of the work. For example, Corresponding Source 142 | includes interface definition files associated with source files for 143 | the work, and the source code for shared libraries and dynamically 144 | linked subprograms that the work is specifically designed to require, 145 | such as by intimate data communication or control flow between those 146 | subprograms and other parts of the work. 147 | 148 | The Corresponding Source need not include anything that users 149 | can regenerate automatically from other parts of the Corresponding 150 | Source. 151 | 152 | The Corresponding Source for a work in source code form is that 153 | same work. 154 | 155 | 2. Basic Permissions. 156 | 157 | All rights granted under this License are granted for the term of 158 | copyright on the Program, and are irrevocable provided the stated 159 | conditions are met. This License explicitly affirms your unlimited 160 | permission to run the unmodified Program. The output from running a 161 | covered work is covered by this License only if the output, given its 162 | content, constitutes a covered work. This License acknowledges your 163 | rights of fair use or other equivalent, as provided by copyright law. 164 | 165 | You may make, run and propagate covered works that you do not 166 | convey, without conditions so long as your license otherwise remains 167 | in force. You may convey covered works to others for the sole purpose 168 | of having them make modifications exclusively for you, or provide you 169 | with facilities for running those works, provided that you comply with 170 | the terms of this License in conveying all material for which you do 171 | not control copyright. Those thus making or running the covered works 172 | for you must do so exclusively on your behalf, under your direction 173 | and control, on terms that prohibit them from making any copies of 174 | your copyrighted material outside their relationship with you. 175 | 176 | Conveying under any other circumstances is permitted solely under 177 | the conditions stated below. Sublicensing is not allowed; section 10 178 | makes it unnecessary. 179 | 180 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 181 | 182 | No covered work shall be deemed part of an effective technological 183 | measure under any applicable law fulfilling obligations under article 184 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 185 | similar laws prohibiting or restricting circumvention of such 186 | measures. 187 | 188 | When you convey a covered work, you waive any legal power to forbid 189 | circumvention of technological measures to the extent such circumvention 190 | is effected by exercising rights under this License with respect to 191 | the covered work, and you disclaim any intention to limit operation or 192 | modification of the work as a means of enforcing, against the work's 193 | users, your or third parties' legal rights to forbid circumvention of 194 | technological measures. 195 | 196 | 4. Conveying Verbatim Copies. 197 | 198 | You may convey verbatim copies of the Program's source code as you 199 | receive it, in any medium, provided that you conspicuously and 200 | appropriately publish on each copy an appropriate copyright notice; 201 | keep intact all notices stating that this License and any 202 | non-permissive terms added in accord with section 7 apply to the code; 203 | keep intact all notices of the absence of any warranty; and give all 204 | recipients a copy of this License along with the Program. 205 | 206 | You may charge any price or no price for each copy that you convey, 207 | and you may offer support or warranty protection for a fee. 208 | 209 | 5. Conveying Modified Source Versions. 210 | 211 | You may convey a work based on the Program, or the modifications to 212 | produce it from the Program, in the form of source code under the 213 | terms of section 4, provided that you also meet all of these conditions: 214 | 215 | a) The work must carry prominent notices stating that you modified 216 | it, and giving a relevant date. 217 | 218 | b) The work must carry prominent notices stating that it is 219 | released under this License and any conditions added under section 220 | 7. This requirement modifies the requirement in section 4 to 221 | "keep intact all notices". 222 | 223 | c) You must license the entire work, as a whole, under this 224 | License to anyone who comes into possession of a copy. This 225 | License will therefore apply, along with any applicable section 7 226 | additional terms, to the whole of the work, and all its parts, 227 | regardless of how they are packaged. This License gives no 228 | permission to license the work in any other way, but it does not 229 | invalidate such permission if you have separately received it. 230 | 231 | d) If the work has interactive user interfaces, each must display 232 | Appropriate Legal Notices; however, if the Program has interactive 233 | interfaces that do not display Appropriate Legal Notices, your 234 | work need not make them do so. 235 | 236 | A compilation of a covered work with other separate and independent 237 | works, which are not by their nature extensions of the covered work, 238 | and which are not combined with it such as to form a larger program, 239 | in or on a volume of a storage or distribution medium, is called an 240 | "aggregate" if the compilation and its resulting copyright are not 241 | used to limit the access or legal rights of the compilation's users 242 | beyond what the individual works permit. Inclusion of a covered work 243 | in an aggregate does not cause this License to apply to the other 244 | parts of the aggregate. 245 | 246 | 6. Conveying Non-Source Forms. 247 | 248 | You may convey a covered work in object code form under the terms 249 | of sections 4 and 5, provided that you also convey the 250 | machine-readable Corresponding Source under the terms of this License, 251 | in one of these ways: 252 | 253 | a) Convey the object code in, or embodied in, a physical product 254 | (including a physical distribution medium), accompanied by the 255 | Corresponding Source fixed on a durable physical medium 256 | customarily used for software interchange. 257 | 258 | b) Convey the object code in, or embodied in, a physical product 259 | (including a physical distribution medium), accompanied by a 260 | written offer, valid for at least three years and valid for as 261 | long as you offer spare parts or customer support for that product 262 | model, to give anyone who possesses the object code either (1) a 263 | copy of the Corresponding Source for all the software in the 264 | product that is covered by this License, on a durable physical 265 | medium customarily used for software interchange, for a price no 266 | more than your reasonable cost of physically performing this 267 | conveying of source, or (2) access to copy the 268 | Corresponding Source from a network server at no charge. 269 | 270 | c) Convey individual copies of the object code with a copy of the 271 | written offer to provide the Corresponding Source. This 272 | alternative is allowed only occasionally and noncommercially, and 273 | only if you received the object code with such an offer, in accord 274 | with subsection 6b. 275 | 276 | d) Convey the object code by offering access from a designated 277 | place (gratis or for a charge), and offer equivalent access to the 278 | Corresponding Source in the same way through the same place at no 279 | further charge. You need not require recipients to copy the 280 | Corresponding Source along with the object code. If the place to 281 | copy the object code is a network server, the Corresponding Source 282 | may be on a different server (operated by you or a third party) 283 | that supports equivalent copying facilities, provided you maintain 284 | clear directions next to the object code saying where to find the 285 | Corresponding Source. Regardless of what server hosts the 286 | Corresponding Source, you remain obligated to ensure that it is 287 | available for as long as needed to satisfy these requirements. 288 | 289 | e) Convey the object code using peer-to-peer transmission, provided 290 | you inform other peers where the object code and Corresponding 291 | Source of the work are being offered to the general public at no 292 | charge under subsection 6d. 293 | 294 | A separable portion of the object code, whose source code is excluded 295 | from the Corresponding Source as a System Library, need not be 296 | included in conveying the object code work. 297 | 298 | A "User Product" is either (1) a "consumer product", which means any 299 | tangible personal property which is normally used for personal, family, 300 | or household purposes, or (2) anything designed or sold for incorporation 301 | into a dwelling. In determining whether a product is a consumer product, 302 | doubtful cases shall be resolved in favor of coverage. For a particular 303 | product received by a particular user, "normally used" refers to a 304 | typical or common use of that class of product, regardless of the status 305 | of the particular user or of the way in which the particular user 306 | actually uses, or expects or is expected to use, the product. A product 307 | is a consumer product regardless of whether the product has substantial 308 | commercial, industrial or non-consumer uses, unless such uses represent 309 | the only significant mode of use of the product. 310 | 311 | "Installation Information" for a User Product means any methods, 312 | procedures, authorization keys, or other information required to install 313 | and execute modified versions of a covered work in that User Product from 314 | a modified version of its Corresponding Source. The information must 315 | suffice to ensure that the continued functioning of the modified object 316 | code is in no case prevented or interfered with solely because 317 | modification has been made. 318 | 319 | If you convey an object code work under this section in, or with, or 320 | specifically for use in, a User Product, and the conveying occurs as 321 | part of a transaction in which the right of possession and use of the 322 | User Product is transferred to the recipient in perpetuity or for a 323 | fixed term (regardless of how the transaction is characterized), the 324 | Corresponding Source conveyed under this section must be accompanied 325 | by the Installation Information. But this requirement does not apply 326 | if neither you nor any third party retains the ability to install 327 | modified object code on the User Product (for example, the work has 328 | been installed in ROM). 329 | 330 | The requirement to provide Installation Information does not include a 331 | requirement to continue to provide support service, warranty, or updates 332 | for a work that has been modified or installed by the recipient, or for 333 | the User Product in which it has been modified or installed. Access to a 334 | network may be denied when the modification itself materially and 335 | adversely affects the operation of the network or violates the rules and 336 | protocols for communication across the network. 337 | 338 | Corresponding Source conveyed, and Installation Information provided, 339 | in accord with this section must be in a format that is publicly 340 | documented (and with an implementation available to the public in 341 | source code form), and must require no special password or key for 342 | unpacking, reading or copying. 343 | 344 | 7. Additional Terms. 345 | 346 | "Additional permissions" are terms that supplement the terms of this 347 | License by making exceptions from one or more of its conditions. 348 | Additional permissions that are applicable to the entire Program shall 349 | be treated as though they were included in this License, to the extent 350 | that they are valid under applicable law. If additional permissions 351 | apply only to part of the Program, that part may be used separately 352 | under those permissions, but the entire Program remains governed by 353 | this License without regard to the additional permissions. 354 | 355 | When you convey a copy of a covered work, you may at your option 356 | remove any additional permissions from that copy, or from any part of 357 | it. (Additional permissions may be written to require their own 358 | removal in certain cases when you modify the work.) You may place 359 | additional permissions on material, added by you to a covered work, 360 | for which you have or can give appropriate copyright permission. 361 | 362 | Notwithstanding any other provision of this License, for material you 363 | add to a covered work, you may (if authorized by the copyright holders of 364 | that material) supplement the terms of this License with terms: 365 | 366 | a) Disclaiming warranty or limiting liability differently from the 367 | terms of sections 15 and 16 of this License; or 368 | 369 | b) Requiring preservation of specified reasonable legal notices or 370 | author attributions in that material or in the Appropriate Legal 371 | Notices displayed by works containing it; or 372 | 373 | c) Prohibiting misrepresentation of the origin of that material, or 374 | requiring that modified versions of such material be marked in 375 | reasonable ways as different from the original version; or 376 | 377 | d) Limiting the use for publicity purposes of names of licensors or 378 | authors of the material; or 379 | 380 | e) Declining to grant rights under trademark law for use of some 381 | trade names, trademarks, or service marks; or 382 | 383 | f) Requiring indemnification of licensors and authors of that 384 | material by anyone who conveys the material (or modified versions of 385 | it) with contractual assumptions of liability to the recipient, for 386 | any liability that these contractual assumptions directly impose on 387 | those licensors and authors. 388 | 389 | All other non-permissive additional terms are considered "further 390 | restrictions" within the meaning of section 10. If the Program as you 391 | received it, or any part of it, contains a notice stating that it is 392 | governed by this License along with a term that is a further 393 | restriction, you may remove that term. If a license document contains 394 | a further restriction but permits relicensing or conveying under this 395 | License, you may add to a covered work material governed by the terms 396 | of that license document, provided that the further restriction does 397 | not survive such relicensing or conveying. 398 | 399 | If you add terms to a covered work in accord with this section, you 400 | must place, in the relevant source files, a statement of the 401 | additional terms that apply to those files, or a notice indicating 402 | where to find the applicable terms. 403 | 404 | Additional terms, permissive or non-permissive, may be stated in the 405 | form of a separately written license, or stated as exceptions; 406 | the above requirements apply either way. 407 | 408 | 8. Termination. 409 | 410 | You may not propagate or modify a covered work except as expressly 411 | provided under this License. Any attempt otherwise to propagate or 412 | modify it is void, and will automatically terminate your rights under 413 | this License (including any patent licenses granted under the third 414 | paragraph of section 11). 415 | 416 | However, if you cease all violation of this License, then your 417 | license from a particular copyright holder is reinstated (a) 418 | provisionally, unless and until the copyright holder explicitly and 419 | finally terminates your license, and (b) permanently, if the copyright 420 | holder fails to notify you of the violation by some reasonable means 421 | prior to 60 days after the cessation. 422 | 423 | Moreover, your license from a particular copyright holder is 424 | reinstated permanently if the copyright holder notifies you of the 425 | violation by some reasonable means, this is the first time you have 426 | received notice of violation of this License (for any work) from that 427 | copyright holder, and you cure the violation prior to 30 days after 428 | your receipt of the notice. 429 | 430 | Termination of your rights under this section does not terminate the 431 | licenses of parties who have received copies or rights from you under 432 | this License. If your rights have been terminated and not permanently 433 | reinstated, you do not qualify to receive new licenses for the same 434 | material under section 10. 435 | 436 | 9. Acceptance Not Required for Having Copies. 437 | 438 | You are not required to accept this License in order to receive or 439 | run a copy of the Program. Ancillary propagation of a covered work 440 | occurring solely as a consequence of using peer-to-peer transmission 441 | to receive a copy likewise does not require acceptance. However, 442 | nothing other than this License grants you permission to propagate or 443 | modify any covered work. These actions infringe copyright if you do 444 | not accept this License. Therefore, by modifying or propagating a 445 | covered work, you indicate your acceptance of this License to do so. 446 | 447 | 10. Automatic Licensing of Downstream Recipients. 448 | 449 | Each time you convey a covered work, the recipient automatically 450 | receives a license from the original licensors, to run, modify and 451 | propagate that work, subject to this License. You are not responsible 452 | for enforcing compliance by third parties with this License. 453 | 454 | An "entity transaction" is a transaction transferring control of an 455 | organization, or substantially all assets of one, or subdividing an 456 | organization, or merging organizations. If propagation of a covered 457 | work results from an entity transaction, each party to that 458 | transaction who receives a copy of the work also receives whatever 459 | licenses to the work the party's predecessor in interest had or could 460 | give under the previous paragraph, plus a right to possession of the 461 | Corresponding Source of the work from the predecessor in interest, if 462 | the predecessor has it or can get it with reasonable efforts. 463 | 464 | You may not impose any further restrictions on the exercise of the 465 | rights granted or affirmed under this License. For example, you may 466 | not impose a license fee, royalty, or other charge for exercise of 467 | rights granted under this License, and you may not initiate litigation 468 | (including a cross-claim or counterclaim in a lawsuit) alleging that 469 | any patent claim is infringed by making, using, selling, offering for 470 | sale, or importing the Program or any portion of it. 471 | 472 | 11. Patents. 473 | 474 | A "contributor" is a copyright holder who authorizes use under this 475 | License of the Program or a work on which the Program is based. The 476 | work thus licensed is called the contributor's "contributor version". 477 | 478 | A contributor's "essential patent claims" are all patent claims 479 | owned or controlled by the contributor, whether already acquired or 480 | hereafter acquired, that would be infringed by some manner, permitted 481 | by this License, of making, using, or selling its contributor version, 482 | but do not include claims that would be infringed only as a 483 | consequence of further modification of the contributor version. For 484 | purposes of this definition, "control" includes the right to grant 485 | patent sublicenses in a manner consistent with the requirements of 486 | this License. 487 | 488 | Each contributor grants you a non-exclusive, worldwide, royalty-free 489 | patent license under the contributor's essential patent claims, to 490 | make, use, sell, offer for sale, import and otherwise run, modify and 491 | propagate the contents of its contributor version. 492 | 493 | In the following three paragraphs, a "patent license" is any express 494 | agreement or commitment, however denominated, not to enforce a patent 495 | (such as an express permission to practice a patent or covenant not to 496 | sue for patent infringement). To "grant" such a patent license to a 497 | party means to make such an agreement or commitment not to enforce a 498 | patent against the party. 499 | 500 | If you convey a covered work, knowingly relying on a patent license, 501 | and the Corresponding Source of the work is not available for anyone 502 | to copy, free of charge and under the terms of this License, through a 503 | publicly available network server or other readily accessible means, 504 | then you must either (1) cause the Corresponding Source to be so 505 | available, or (2) arrange to deprive yourself of the benefit of the 506 | patent license for this particular work, or (3) arrange, in a manner 507 | consistent with the requirements of this License, to extend the patent 508 | license to downstream recipients. "Knowingly relying" means you have 509 | actual knowledge that, but for the patent license, your conveying the 510 | covered work in a country, or your recipient's use of the covered work 511 | in a country, would infringe one or more identifiable patents in that 512 | country that you have reason to believe are valid. 513 | 514 | If, pursuant to or in connection with a single transaction or 515 | arrangement, you convey, or propagate by procuring conveyance of, a 516 | covered work, and grant a patent license to some of the parties 517 | receiving the covered work authorizing them to use, propagate, modify 518 | or convey a specific copy of the covered work, then the patent license 519 | you grant is automatically extended to all recipients of the covered 520 | work and works based on it. 521 | 522 | A patent license is "discriminatory" if it does not include within 523 | the scope of its coverage, prohibits the exercise of, or is 524 | conditioned on the non-exercise of one or more of the rights that are 525 | specifically granted under this License. You may not convey a covered 526 | work if you are a party to an arrangement with a third party that is 527 | in the business of distributing software, under which you make payment 528 | to the third party based on the extent of your activity of conveying 529 | the work, and under which the third party grants, to any of the 530 | parties who would receive the covered work from you, a discriminatory 531 | patent license (a) in connection with copies of the covered work 532 | conveyed by you (or copies made from those copies), or (b) primarily 533 | for and in connection with specific products or compilations that 534 | contain the covered work, unless you entered into that arrangement, 535 | or that patent license was granted, prior to 28 March 2007. 536 | 537 | Nothing in this License shall be construed as excluding or limiting 538 | any implied license or other defenses to infringement that may 539 | otherwise be available to you under applicable patent law. 540 | 541 | 12. No Surrender of Others' Freedom. 542 | 543 | If conditions are imposed on you (whether by court order, agreement or 544 | otherwise) that contradict the conditions of this License, they do not 545 | excuse you from the conditions of this License. If you cannot convey a 546 | covered work so as to satisfy simultaneously your obligations under this 547 | License and any other pertinent obligations, then as a consequence you may 548 | not convey it at all. For example, if you agree to terms that obligate you 549 | to collect a royalty for further conveying from those to whom you convey 550 | the Program, the only way you could satisfy both those terms and this 551 | License would be to refrain entirely from conveying the Program. 552 | 553 | 13. Use with the GNU Affero General Public License. 554 | 555 | Notwithstanding any other provision of this License, you have 556 | permission to link or combine any covered work with a work licensed 557 | under version 3 of the GNU Affero General Public License into a single 558 | combined work, and to convey the resulting work. The terms of this 559 | License will continue to apply to the part which is the covered work, 560 | but the special requirements of the GNU Affero General Public License, 561 | section 13, concerning interaction through a network will apply to the 562 | combination as such. 563 | 564 | 14. Revised Versions of this License. 565 | 566 | The Free Software Foundation may publish revised and/or new versions of 567 | the GNU General Public License from time to time. Such new versions will 568 | be similar in spirit to the present version, but may differ in detail to 569 | address new problems or concerns. 570 | 571 | Each version is given a distinguishing version number. If the 572 | Program specifies that a certain numbered version of the GNU General 573 | Public License "or any later version" applies to it, you have the 574 | option of following the terms and conditions either of that numbered 575 | version or of any later version published by the Free Software 576 | Foundation. If the Program does not specify a version number of the 577 | GNU General Public License, you may choose any version ever published 578 | by the Free Software Foundation. 579 | 580 | If the Program specifies that a proxy can decide which future 581 | versions of the GNU General Public License can be used, that proxy's 582 | public statement of acceptance of a version permanently authorizes you 583 | to choose that version for the Program. 584 | 585 | Later license versions may give you additional or different 586 | permissions. However, no additional obligations are imposed on any 587 | author or copyright holder as a result of your choosing to follow a 588 | later version. 589 | 590 | 15. Disclaimer of Warranty. 591 | 592 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 593 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 594 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 595 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 596 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 597 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 598 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 599 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 600 | 601 | 16. Limitation of Liability. 602 | 603 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 604 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 605 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 606 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 607 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 608 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 609 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 610 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 611 | SUCH DAMAGES. 612 | 613 | 17. Interpretation of Sections 15 and 16. 614 | 615 | If the disclaimer of warranty and limitation of liability provided 616 | above cannot be given local legal effect according to their terms, 617 | reviewing courts shall apply local law that most closely approximates 618 | an absolute waiver of all civil liability in connection with the 619 | Program, unless a warranty or assumption of liability accompanies a 620 | copy of the Program in return for a fee. 621 | 622 | END OF TERMS AND CONDITIONS 623 | ``` -------------------------------------------------------------------------------- /NOTES.md: -------------------------------------------------------------------------------- 1 | docsify quickies {docsify-ignore-all} 2 | 3 | >Sidebar 4 | 5 | # Heading {docsify-ignore-all} //ignores all headings underneath 6 | # heading {docsify-ignore} //ignores this heading from sidebar 7 | # loadSidebar: true, subMaxLevel: 2 /initialize sidebar.md and set subheading as links in sidebar 8 | 9 | https://developer.gnome.org/gtk3/stable/chap-css-overview.html 10 | 11 | https://paper.dropbox.com/doc/Selector-syntax--ADu1lHUypjS73FxoY0veT8kdAQ-Hio6BKloZaMU4lmRalO7h 12 | https://paper.dropbox.com/doc/gtk-icon--ADs2QYNC9ypVUUAZV6uyuu9~AQ-BxJU5pyVmhtz89ZWsqv1p 13 | 14 | 15 | 16 | ```sh 17 | now 18 | now alias 19 | now remove -s all gtkthemingguide 20 | ``` -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gtk theming guide 2 | [Welp I'm no longer working on this so any pull request is appreciated] 3 | 4 | [![Code Triagers Badge](https://www.codetriage.com/surajmandalcell/gtk-theming-guide/badges/users.svg)](https://www.codetriage.com/surajmandalcell/gtk-theming-guide) 5 | 6 | A novice guide to making gtk theme! 7 | 8 | Visit here https://gtkthemingguide.now.sh to see full documentation 9 | 10 | ![](_media/thumbnail.png) 11 | 12 | 13 | ### Also see 14 | - [CREDITS](CREDITS.md) 15 | - [LICENSE - GNU GPL V3](LICENSE.md) 16 | -------------------------------------------------------------------------------- /_coverpage.md: -------------------------------------------------------------------------------- 1 | ![logo](_media/logo.png) 2 | 3 | # GTK THEMING GUIDE 4 | 5 | > A novice guide to making gtk theme! 6 | 7 | * Introduction to basics 8 | * Simple and Well formated 9 | * Creating icon themes included 10 | 11 | [GitHub](https://github.com/surajmandalcell/Gtk-Theming-Guide) 12 | [Get Started](#basic-concepts) 13 | 14 | -------------------------------------------------------------------------------- /_media/color_picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/_media/color_picker.png -------------------------------------------------------------------------------- /_media/gtk_inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/_media/gtk_inspector.png -------------------------------------------------------------------------------- /_media/home_img_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/_media/home_img_header.png -------------------------------------------------------------------------------- /_media/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/_media/logo.png -------------------------------------------------------------------------------- /_media/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajmandalcell/gtk-theming-guide/28216396069932f6be6b858042b5d0e976e81651/_media/thumbnail.png -------------------------------------------------------------------------------- /_sidebar.md: -------------------------------------------------------------------------------- 1 | * [Getting Started](getting_started.md) 2 | * [Creating Gtk Themes](creating_gtk_themes.md) 3 | * [FAQ Gtk Themes](faq_gtk_themes.md) 4 | * [Creating Icon Theme](creating_icon_theme.md) 5 | 6 | * [Further Reading](further_reading.md) 7 | * [Credits](CREDITS.md) 8 | -------------------------------------------------------------------------------- /creating_gtk_themes.md: -------------------------------------------------------------------------------- 1 | ## Study A Premade GTK3 Theme 2 | 3 | To create a GTK3 theme, developers can start with an empty file or they can use a pre-existing theme as a template. It may help beginners to start with a pre-existing theme. For instance, a theme can be copied to the user's home folder and then the developer can start editing the files. 4 | 5 | The general format for a GTK3 theme is to create a folder named after the theme. Then, create a sub-directory called "gtk-3.0" and create a file inside of it named "gtk.css". In the "gtk.css" file, use CSS code to control how the theme will look. Move the theme to ~/.themes for testing purposes. Use the newly created theme and make changes as necessary. If desired, developers can add additional components to the theme for GTK2, Openbox, Metacity, Unity, etc. 6 | 7 | > To explain how to create themes, we will study the "Ambiance" theme, which is usually found at /usr/share/themes/Ambiance. This directory contains the below listed sub-directories and a file named "index.theme". 8 | 9 | - gtk-2.0 10 | - gtk-3.0 11 | - metacity-1 12 | - unity 13 | 14 |
15 | "**index.theme**" contains metadata (such as the theme's name) and some important settings (such as the button layout). Below is the "index.theme" file for "Ambiance". 16 | 17 | code : 18 | ```sh 19 | [Desktop Entry] 20 | Type=X-GNOME-Metatheme 21 | Name=Ambiance 22 | Comment=Ubuntu Ambiance theme 23 | Encoding=UTF-8 24 | 25 | [X-GNOME-Metatheme] 26 | GtkTheme=Ambiance 27 | MetacityTheme=Ambiance 28 | IconTheme=ubuntu-mono-dark 29 | CursorTheme=DMZ-White 30 | ButtonLayout=close,minimize,maximize: 31 | X-Ubuntu-UseOverlayScrollbars=true 32 | ``` 33 | 34 |
35 | 36 | 37 | The "**gtk-3.0**" directory contains files for GTK3. Instead of "gtkrc", GTK3 uses "gtk.css" as the main theme file. In the Ambiance theme, the file contains one line - '@import url("gtk-main.css");'. The "settings.ini" file contains important theme-wide settings. GTK3 themes use an "apps" directory for the same purpose as GTK2. The "assets" directory contains images for radio buttons, check-boxes, etc. Below are the contents of /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css 38 | 39 | code : 40 | 41 | ```css 42 | /*default color scheme */ 43 | @define-color bg_color #f2f1f0; 44 | @define-color fg_color #4c4c4c; 45 | @define-color base_color #ffffff; 46 | @define-color text_color #3C3C3C; 47 | @define-color selected_bg_color #f07746; 48 | @define-color selected_fg_color #ffffff; 49 | @define-color tooltip_bg_color #000000; 50 | @define-color tooltip_fg_color #ffffff; 51 | 52 | /* misc colors used by gtk+ 53 | * 54 | * Gtk doesn't currently expand color variables for style properties. Thus, 55 | * gtk-widgets.css uses literal color names, but includes a comment containing 56 | * the name of the variable. Please remember to change values there as well 57 | * when changing one of the variables below. 58 | */ 59 | @define-color info_fg_color rgb (181, 171, 156); 60 | @define-color info_bg_color rgb (252, 252, 189); 61 | @define-color warning_fg_color rgb (173, 120, 41); 62 | @define-color warning_bg_color rgb (250, 173, 61); 63 | @define-color question_fg_color rgb (97, 122, 214); 64 | @define-color question_bg_color rgb (138, 173, 212); 65 | @define-color error_fg_color rgb (235, 235, 235); 66 | @define-color error_bg_color rgb (223, 56, 44); 67 | @define-color link_color @selected_bg_color; 68 | @define-color success_color #4e9a06; 69 | @define-color error_color #df382c; 70 | 71 | /* theme common colors */ 72 | @define-color button_bg_color shade (@bg_color, 1.02); /*shade (#cdcdcd, 1.08);*/ 73 | @define-color notebook_button_bg_color shade (@bg_color, 1.02); 74 | @define-color button_insensitive_bg_color mix (@button_bg_color, @bg_color, 0.6); 75 | @define-color dark_bg_color #3c3b37; 76 | @define-color dark_fg_color #dfdbd2; 77 | 78 | @define-color backdrop_fg_color mix (@bg_color, @fg_color, 0.8); 79 | @define-color backdrop_text_color mix (@base_color, @text_color, 0.8); 80 | @define-color backdrop_dark_fg_color mix (@dark_bg_color, @dark_fg_color, 0.75); 81 | /*@define-color backdrop_dark_bg_color mix (@dark_bg_color, @dark_fg_color, 0.75);*/ 82 | @define-color backdrop_selected_bg_color shade (@bg_color, 0.92); 83 | @define-color backdrop_selected_fg_color @fg_color; 84 | 85 | @define-color focus_color alpha (@selected_bg_color, 0.5); 86 | @define-color focus_bg_color alpha (@selected_bg_color, 0.1); 87 | 88 | @define-color shadow_color alpha(black, 0.5); 89 | 90 | @define-color osd_fg_color #eeeeec; 91 | @define-color osd_bg_color alpha(#202526, 0.7); 92 | @define-color osd_border_color alpha(black, 0.7); 93 | 94 | @import url("gtk-widgets-borders.css"); 95 | @import url("gtk-widgets-assets.css"); 96 | @import url("gtk-widgets.css"); 97 | @import url("apps/geary.css"); 98 | @import url("apps/unity.css"); 99 | @import url("apps/baobab.css"); 100 | @import url("apps/gedit.css"); 101 | @import url("apps/nautilus.css"); 102 | @import url("apps/gnome-panel.css"); 103 | @import url("apps/gnome-terminal.css"); 104 | @import url("apps/gnome-system-log.css"); 105 | @import url("apps/unity-greeter.css"); 106 | @import url("apps/glade.css"); 107 | @import url("apps/california.css"); 108 | @import url("apps/software-center.css"); 109 | @import url("public-colors.css"); 110 | ``` 111 | 112 |
113 | 114 | The "**gtk-2.0**" directory contains files for GTK2 such as a "gtkrc" file and an "apps" directory that contains application-specific GTK settings. The "gtkrc" file is the main CSS-file for the GTK2 portion of the theme. Below are the contents of /usr/share/themes/Ambiance/gtk-2.0/apps/nautilus.rc 115 | 116 | code : 117 | ```css 118 | # ============================================================================== 119 | # NAUTILUS SPECIFIC SETTINGS 120 | # ============================================================================== 121 | 122 | style "nautilus_info_pane" { 123 | bg[NORMAL] = @bg_color 124 | } 125 | 126 | widget_class "*Nautilus**" style "nautilus_info_pane" 127 | widget_class "*Nautilus*" style "notebook_button" 128 | widget_class "*Nautilus**" style "notebook_button" 129 | ``` 130 | 131 |
132 | 133 | The "**metacity-1**" folder contains images that the Metacity window-manager uses for buttons (such as the "close window" button). This directory also contains a file named "metacity-theme-1.xml" that contain's the theme's metadata (like the developer's name) and styling. However, the Metacity portion of the theme uses XML rather than CSS. 134 | 135 | Some themes may contain other directories. For instance, "**xfwm4**". The "xfwm4" directory contains `*`.xpm files, `*`.png images (in the "png" folder), a "README" file, and a "themerc" file which contains settings (as seen below). 136 | 137 | ```sh 138 | /usr/share/themes/Clearlooks-Phenix/xfwm4/themerc 139 | ``` 140 | 141 | code : 142 | ```md 143 | # Clearlooks XFWM4 by Casey Kirsle 144 | 145 | show_app_icon=true 146 | active_text_color=#FFFFFF 147 | inactive_text_color=#939393 148 | title_shadow_active=frame 149 | title_shadow_inactive=false 150 | button_layout=O|HMC 151 | button_offset=2 152 | button_spacing=2 153 | full_width_title=true 154 | maximized_offset=0 155 | title_vertical_offset_active=1 156 | title_vertical_offset_inactive=1 157 | ``` 158 | 159 |
160 | 161 | 162 | 163 | ## Importing style sheets 164 | 165 | GTK+ supports the CSS @import rule, in order to load another style sheet in addition to the currently parsed one. 166 | 167 | The syntax for @import rules is as follows: 168 | 169 | 〈import rule〉 = @import [ 〈url〉 | 〈string〉 ] 170 | 〈url〉 = url( 〈string〉 ) 171 | 172 | > An example for using the @import rule 173 | 174 | ```css 175 | @import url("path/to/common.css"); 176 | ``` 177 | 178 | 179 | 180 | ## Selectors 181 | 182 | Selectors work very similar to the way they do in CSS. 183 | 184 | All widgets have one or more CSS nodes with element names and style classes. When style classes are used in selectors, they have to be prefixed with a period. Widget names can be used in selectors like IDs. When used in a selector, widget names must be prefixed with a # character. 185 | 186 | In more complicated situations, selectors can be combined in various ways. To require that a node satisfies several conditions, combine several selectors into one by concatenating them. To only match a node when it occurs inside some other node, write the two selectors after each other, separated by whitespace. To restrict the match to direct children of the parent node, insert a > character between the two selectors. 187 | 188 | ### Examples 189 | 190 | 191 | 192 | **Theme labels that are descendants of a window** 193 | 194 | ```css 195 | window label { 196 | background-color: #898989; 197 | } 198 | ``` 199 | 200 | 201 | **Theme notebooks, and anything within** 202 | 203 | ```css 204 | notebook { 205 | background-color: #a939f0; 206 | } 207 | ``` 208 | 209 | 210 | **Theme combo boxes, and entries that are direct children of a notebook** 211 | 212 | ```css 213 | combobox, 214 | notebook > entry { 215 | color: @fg_color; 216 | background-color: #1209a2; 217 | } 218 | ``` 219 | 220 | 221 | **Theme any widget within a GtkBox** 222 | 223 | ```css 224 | box * { 225 | font: 20px Sans; 226 | } 227 | ``` 228 | 229 | 230 | **Theme a label named title-label** 231 | 232 | ```css 233 | label#title-label { 234 | font: 15px Sans; 235 | } 236 | ``` 237 | 238 | 239 | **Theme any widget named main-entry** 240 | 241 | ```css 242 | #main-entry { 243 | background-color: #f0a810; 244 | } 245 | ``` 246 | 247 | 248 | **Theme all widgets with the style class entry** 249 | 250 | ```css 251 | .entry { 252 | color: #39f1f9; 253 | } 254 | ``` 255 | 256 | 257 | **Theme the entry of a GtkSpinButton** 258 | 259 | ```css 260 | spinbutton entry { 261 | color: #900185; 262 | } 263 | ``` 264 | 265 | 266 | It is possible to select CSS nodes depending on their position amongst their siblings by applying pseudo-classes to the selector, like :first-child, :last-child or :nth-child(even). When used in selectors, pseudo-classes must be prefixed with a : character. 267 | 268 | **Theme labels in the first notebook tab** 269 | 270 | ```css 271 | notebook tab:first-child label { 272 | color: #89d012; 273 | } 274 | ``` 275 | 276 | 277 | > Another use of pseudo-classes is to match widgets depending on their state. The available pseudo-classes for widget states are :active, :hover :disabled, :selected, :focus, :indeterminate, :checked and :backdrop. In addition, the following pseudo-classes don't have a direct equivalent as a widget state: :dir(ltr) and :dir(rtl) (for text direction), :link and :visited (for links) and :drop(active) (for highlighting drop targets). Widget state pseudo-classes may only apply to the last element in a selector. 278 | 279 | **Theme pressed buttons** 280 | 281 | ```css 282 | button:active { 283 | background-color: #0274d9; 284 | } 285 | ``` 286 | 287 | 288 | **Theme buttons with the mouse pointer over it** 289 | 290 | ```css 291 | button:hover { 292 | background-color: #3085a9; 293 | } 294 | ``` 295 | 296 | 297 | **Theme insensitive widgets** 298 | 299 | ```css 300 | *:disabled { 301 | background-color: #320a91; 302 | } 303 | ``` 304 | 305 | 306 | **Theme checkbuttons that are checked** 307 | 308 | ```css 309 | checkbutton:checked { 310 | background-color: #56f9a0; 311 | } 312 | ``` 313 | 314 | 315 | **Theme focused labels** 316 | 317 | ```css 318 | label:focus { 319 | background-color: #b4940f; 320 | } 321 | ``` 322 | 323 | 324 | **Theme inconsistent checkbuttons** 325 | 326 | ```css 327 | checkbutton:indeterminate { 328 | background-color: #20395a; 329 | } 330 | ``` 331 | 332 | 333 | 334 | 335 | To determine the effective style for a widget, all the matching rule sets are merged. As in CSS, rules apply by specificity, so the rules whose selectors more closely match a node will take precedence over the others. 336 | 337 | The full syntax for selectors understood by GTK+ can be found in the table below. The main difference to CSS is that GTK+ does not currently support attribute selectors. 338 | 339 | 340 | 341 | ### A table of selectors used by gtk+ to style apps 342 | 343 | | Pattern | Matches | Reference | Notes | 344 | |---|---|---|---| 345 | |* | any node | CSS | | 346 | | E | any node with name E | CSS | | 347 | | E.class | any E node with the given style class | CSS | | 348 | | E#id | any E node with the given ID | CSS | GTK+ uses the widget name as ID | 349 | | E:nth-child({nth-child}) | any E node which is the n-th child of its parent node | CSS | | 350 | | E:nth-last-child({nth-child}) | any E node which is the n-th child of its parent node, counting from the end | CSS | | 351 | | E:first-child | any E node which is the first child of its parent node | CSS | | 352 | | E:last-child | any E node which is the last child of its parent node | CSS | | 353 | | E:only-child | any E node which is the only child of its parent node | CSS | Equivalent to E:first-child:last-child | 354 | | E:link, E:visited | any E node which represents a hyperlink, not yet visited (:link) or already visited (:visited) | CSS | Corresponds to GTK_STATE_FLAG_LINK and GTK_STATE_FLAGS_VISITED | 355 | | E:active, E:hover, E:focus | any E node which is part of a widget with the corresponding state | CSS | Corresponds to GTK_STATE_FLAG_ACTIVE, GTK_STATE_FLAG_PRELIGHT and GTK_STATE_FLAGS_FOCUSED; GTK+ also allows E:prelight and E:focused | 356 | | E:disabled | any E node which is part of a widget which is disabled | CSS | Corresponds to GTK_STATE_FLAG_INSENSITIVE; GTK+ also allows E:insensitive | 357 | | E:checked | any E node which is part of a widget (e.g. radio- or checkbuttons) which is checked | CSS | Corresponds to GTK_STATE_FLAG_CHECKED | 358 | | E:indeterminate | any E node which is part of a widget (e.g. radio- or checkbuttons) which is in an indeterminate state | CSS3, CSS4 | Corresponds to GTK_STATE_FLAG_INCONSISTENT; GTK+ also allows E:inconsistent | 359 | | E:backdrop, E:selected | any E node which is part of a widget with the corresponding state | - | Corresponds to GTK_STATE_FLAG_BACKDROP, GTK_STATE_FLAG_SELECTED | 360 | | E:not({selector}) | any E node which does not match the simple selector {selector} | CSS | | 361 | | E:dir(ltr), E:dir(rtl) | any E node that has the corresponding text direction | CSS4 | | 362 | | E:drop(active) | any E node that is an active drop target for a current DND operation | CSS4 | | 363 | | E F | any F node which is a descendent of an E node | CSS | | 364 | | E > F | any F node which is a child of an E node | CSS | | 365 | | E ~ F | any F node which is preceded by an E node | CSS | | 366 | | E + F | any F node which is immediately preceded by an E node | CSS | | 367 | 368 | To learn more about selectors in CSS, read the Selectors [module](https://www.w3.org/TR/css3-selectors/) of the CSS specification. 369 | 370 | 371 | ## Colors 372 | 373 | CSS allows to specify colors in various ways, using numeric values or names from a predefined list of colors. 374 | 375 | **Specifying colors in various ways** 376 | 377 | ```css 378 | color: transparent; 379 | background-color: red; 380 | border-top-color: rgb(128,57,0); 381 | border-left-color: rgba(10%,20%,30%,0.5); 382 | border-right-color: #ff00cc; 383 | border-bottom-color: #ffff0000cccc; 384 | ``` 385 | 386 | **An example for defining colors** 387 | 388 | GTK+ adds several additional ways to specify colors. 389 | 390 | {gtk color} = {symbolic color} | {color expression} | {win32 color} 391 | 392 | The first is a reference to a color defined via a @define-color rule. The syntax for @define-color rules is as follows: 393 | 394 | {define color rule} = @define-color {name} {color} 395 | 396 | To refer to the color defined by a @define-color rule, use the name from the rule, prefixed with @. 397 | 398 | {symbolic color} = @{name} 399 | 400 | ```css 401 | @define-color bg_color #f9a039; 402 | 403 | * { 404 | background-color: @bg_color; 405 | } 406 | ``` 407 | 408 | ## Testing Themes 409 | 410 | When creating themes, it may be helpful to test it and tweak the code to get the desired appearance. Such developers may want to use some type of "theme-previewer". Thankfully, some exist. 411 | 412 | - GTK+ Change Theme - This program can change the GTK theme and allow 413 | developers to preview the theme. The program is composed of one 414 | window that contains many widgets, thus providing a complete preview 415 | for the theme. To install this program, type "apt-get install 416 | gtk-chtheme". 417 | - GTK Theme Switch - This program allows users to easily change the 418 | user's theme. Be sure to have some applications open to view and test 419 | the theme. To install this program, type "apt-get install 420 | gtk-theme-switch" and type "gtk-theme-switch2" in a terminal to run 421 | it. 422 | - LXappearance - This program can change themes, icons, and fonts. PyWF 423 | - PyWF is a Python-based alternative to "The Widget Factory". 424 | - The Widget Factory - This is an old GTK-previewer. To install this program, type 425 | "apt-get install thewidgetfactory" and type "twf" in a terminal to 426 | run it. 427 | 428 |

429 | 430 | ## Theme Downloads 431 | 432 | - Cinnamon - http://gnome-look.org/index.php?xcontentmode=104 433 | - Compiz - http://gnome-look.org/index.php?xcontentmode=102 434 | - GNOME Shell - http://gnome-look.org/index.php?xcontentmode=191 435 | - GTK2 - http://gnome-look.org/index.php?xcontentmode=100 436 | - GTK3 - http://gnome-look.org/index.php?xcontentmode=167 437 | - KDE/Qt - 438 | http://kde-look.org/index.php?xcontentmode=8x9x10x11x12x13x14x15x16 439 | - Linux Mint Themes - 440 | http://linuxmint-art.org/index.php?xcontentmode=9x14x100 441 | - Metacity - http://gnome-look.org/index.php?xcontentmode=101 442 | - Ubuntu Themes - http://www.ubuntuthemes.org/ 443 | 444 |
445 | 446 | ## Further Reading 447 | 448 | - Gtk+ CSS Overview - https://developer.gnome.org/gtk3/stable/chap-css-overview.html 449 | - Graphical User Interface (GUI) Reading Guide - 450 | http://www.linux.org/threads/gui-reading-guide.6471/ 451 | - GTK - http://www.linux.org/threads/understanding-gtk.6291/ 452 | - Introduction to Glade - 453 | http://www.linux.org/threads/introduction-to-glade.7142/ 454 | - Desktop Environment vs Window Managers - 455 | http://www.linux.org/threads/desktop-environment-vs-window-managers.7802/ 456 | - Official GTK+ 3 Reference Manual - 457 | https://developer.gnome.org/gtk3/stable/ 458 | - GtkCssProvider - 459 | https://developer.gnome.org/gtk3/stable/GtkCssProvider.html 460 | -------------------------------------------------------------------------------- /creating_icon_theme.md: -------------------------------------------------------------------------------- 1 | ## Creating Icon Theme 2 | 3 | Not only can Linux users customize the desktop theme, but they can also change the icons. Icon-theme packs are easy to make, install, and obtain. Many Linux users may find it helpful to learn how to change icons, edit them, get more, etc. 4 | 5 | ## Icon Location 6 | 7 | Icons may be stored in "~/.icons" or "/usr/share/icons". Icons that are in "~/.icons" are only accessible to the owner of that home folder. While icons in "/usr/share/icons" are global-icons that are accessible by all users. "/usr/share/pixmaps" contains icons that are installed or used by various applications and software packages. 8 | 9 | ## Icon Searching 10 | 11 | Applications that are looking for an icon will first look in "~/.icons". Next, the application will try "/usr/share/icons", and then "/usr/share/pixmaps". 12 | 13 | ## Icon Theme 14 | 15 | An icon theme has a specific structure/format that must be used to create a usable icon-pack. Inside the icon directories ("~/.icons" and "/usr/share/icons"), each icon theme has its own folder that is named after the icon-theme. Within the icon-theme's directory are several folders and some important files. For instance, an icon-theme may contain the below listed directories and files. 16 | Directories 17 | 18 | * 8x8 19 | * 16x16 20 | * 22x22 21 | * 24x24 22 | * 32x32 23 | * 48x48 24 | * 52x52 25 | * 128x128 26 | * 240x240 27 | * 256x256 28 | * 512x512 29 | * scalable 30 | * scalable-up-to-32 31 | * Files 32 | * AUTHORS 33 | * CONTRIBUTORS 34 | * COPYING 35 | * cursor.theme 36 | * icon-theme.cache 37 | * index.theme 38 | * Adwaita-Icon-Theme-Folder.jpg 39 | 40 | The directories contain images and icons with the specified dimensions used as the folder names (in pixels). 41 | 42 | However, "scalable" and "scalable-up-to-32" contain SVG files. The SVG files in "scalable-up-to-32" can be used without issues when used at 32-pixels or below. Within each directory are more folders as listed and described below. Each of these sub-directories may contain SVG, PNG, or XPM files (PNG is recommended). 43 | 44 | Each file must use a particular name so that the desktop system can find the icon that it needs. Soft-links (shortcuts) are permitted because they allow developers to create one image that can be the icon for many uses (such as using the same image for all types of mount optical disks). 45 | 46 | To learn more about the filenames for icons, refer to the naming specification - [freedesktop referance page](http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) 47 | 48 | 49 | - actions - Icons for actions (such as redo, close, play, etc.) that may be seen in toolbars, menus, buttons, etc. 50 | - animations - Images that are used to make animated icons (such as "loading spinners" or disc-burning progress) 51 | - apps - Icons for specific applications or for applications of a general type 52 | - categories - Icons for various application categories 53 | - devices - Icons for devices such as mounted storage media, optical disks, iPods, phones, printers, etc. 54 | - emblems - Icons for tags and file properties (such as the "unreadable" or "soft-link" symbol) 55 | - emotes - Emoticons/Emojis 56 | - International - Icons representing different languages/nations 57 | - mimetypes (or mimes) - Icons for various mimetypes; these are typically used as the icons for files 58 | - places - Icons for folders, servers, trash-bin, etc. 59 | - search - Images for search-related icons 60 | - status - Icons used for notifications (like "error", "warning", etc.), battery level, audio volume, network status, etc. 61 | - stock - Miscellaneous 62 | - web - Icons for web-apps (like the web-apps commonly seen in the Unity dashboard) 63 | 64 | The icon images themselves can be made using Gimp (when making PNG files) and Inkscape (when making SVG files). All icon images must be a perfect square. Thus, the "32x32" icons must be 32 pixels tall and 32 pixels wide. RGBa is recommended, especially for the transparency layer (alpha-channel). 65 | 66 | Some icon-themes (like "Humanity") use a slightly different format. The "Humanity" icon-pack contains folders for each icon context (emotes, devices, places, etc.) and then the different sizes as sub-directories. The sub-directories for each icon size uses the name format "22" rather than "22x22". 67 | 68 | The files in the root of the icon-theme each have a particular purpose as described below. 69 | 70 | AUTHORS - List of authors and possibly their contact information and website 71 | 72 | CONTRIBUTORS - List of people that helped with the project 73 | 74 | COPYING - The license (such as GPL) 75 | 76 | cursor.theme - Cursor-theme information 77 | 78 | icon-theme.cache - Icon cache that are used as memory mapped files; the files directly map the icons files, thus reducing the time to find a needed icon 79 | 80 | index.theme - The icon-theme description file; encoded in UTF-8 81 | 82 | FUN FACT: The "gtk-update-icon-cache" command can be used to update/refresh the icon cache files. 83 | 84 | Sample index.theme 85 | Code: 86 | ``` 87 | [Icon Theme] 88 | Name=Theme_Name 89 | Name[ca]=Translated_Name 90 | Name[cs]=Translated_Name 91 | Name[da]=Translated_Name 92 | Comment=Theme_Description 93 | Comment[ca]=Translated_Theme_Description 94 | Comment[cs]=Translated_Theme_Description 95 | Comment[da]=Translated_Theme_Description 96 | Inherits=Name_a_Theme_to_use_as_a_Fallback 97 | ``` 98 | 99 | ## KDE specific settings 100 | ``` 101 | DisplayDepth=32 102 | LinkOverlay=link_overlay 103 | LockOverlay=lock_overlay 104 | ZipOverlay=zip_overlay 105 | DesktopDefault=48 106 | DesktopSizes=16,22,32,48,64,72,96,128 107 | ToolbarDefault=22 108 | ToolbarSizes=16,22,32,48 109 | MainToolbarDefault=22 110 | MainToolbarSizes=16,22,32,48 111 | SmallDefault=16 112 | SmallSizes=16 113 | PanelDefault=32 114 | PanelSizes=16,22,32,48,64,72,96,128 115 | ``` 116 | 117 | ## List all directories 118 | ``` 119 | Directories=8x8/emblems,16x16/actions,16x16/apps, 120 | ``` 121 | 122 | 123 | ## Specify the context, size, and type of each directory 124 | ``` 125 | [8x8/emblems] 126 | Context=Emblems 127 | Size=8 128 | Type=Fixed 129 | ``` 130 | Installing and Removing Icons 131 | Icon themes can be installed by placing the icon-pack in one of the proper icon directories. If the icons are placed in "/usr/share/icons", then ensure that the owner is "Root" and the proper permissions are set so that all users can read the files. 132 | 133 | To recursively set the proper permissions and ownership to all folders and files in the icon-pack, execute the below commands. Open a terminal in "/usr/share/icons" before executing the commands. 134 | 135 | 136 | Code: 137 | ``` 138 | chown -R root:root ./THEME_NAME 139 | find ./THEME_NAME -type d -exec chmod 755 {} \; 140 | find ./THEME_NAME -type f -exec chmod 644 {} \; 141 | ``` 142 | NOTE: Directories must use "755" permissions (drwxr-xr-x) and files must use "644" permissions (rw-r--r--). This is better for security while ensuring that users and programs can access the data. 143 | 144 | To remove icon themes, delete the icon-pack's directory. 145 | 146 | Obtaining Icons 147 | 148 | Icons can be obtained via the repositories or from various websites. 149 | 150 | GNOME-Look - http://gnome-look.org/index.php?xcontentmode=120x121 151 | 152 | Noobs Lab - http://www.noobslab.com/p/themes-icons.html 153 | 154 | Changing Icons 155 | Most theme changers also provide an interface for changing the icons. Such applications include "Ubuntu Tweak", "Unity Tweak Tool", "Appearance", and others. 156 | 157 | ## Cursors 158 | 159 | Cursors are also found in "~/.icons" and "/usr/share/icons". Cursor-themes use a similar format. However, the folder contains a "cursors" directory and two files - "cursor.theme" and "index.theme". Inside of the "cursors" directory are files that are each named after each type of cursor (top_left_corner, help, move, grabbing, etc.). 160 | 161 | These files are "X11 cursor images" and they have the "image/x-xcursor" mimetype. This type of image file contains multiple images. Each contained image is 48, 32, and 24 pixels in height and width; the images support the alpha-layer (transparency/RGBa). Gimp supports X11 cursor images and represents the contained sub-images as different layers. Each layer must be named using the format "(SIZEpx)_1 (50ms) (replace)", where "SIZE" is the width/height in pixels. 162 | 163 | All cursors that are drawn in these images must be in the center of the space (whether the space be 48x48 pixels or some other size). 164 | -------------------------------------------------------------------------------- /custom.css: -------------------------------------------------------------------------------- 1 | a:focus{ 2 | outline: none; 3 | } 4 | 5 | a:active{ 6 | outline: none; 7 | } 8 | 9 | .markdown-section strong{ 10 | font-size: 1.2rem; 11 | } 12 | 13 | .markdown-section p a img{ 14 | border:0px; 15 | height:32px; 16 | text-decoration: none; 17 | } -------------------------------------------------------------------------------- /faq_gtk_themes.md_.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | ### How do i find class names of an gtk widget? 4 | 5 | Class names of an widget depends on the program itself, if the programmer specifies a class for that widget then only you can find it using the gtkInspector tool else there isn't any class to specify to start with. 6 | 7 | Now if the class exists then follow the steps 8 | 9 | 1. Open gtk inspector using `ctrl+shift+i` or `ctrl+shift+d` on the program window. 10 | 2. Using the inspect button on the top left corner select the widget that you want to get the style off. 11 | 3. Navigate to the `Css Nodes` section from the dropdown menu on the objects tab. 12 | 4. Expand the hierchy and you'll find the class and id listed with more relevant information in sidebar. 13 | 14 | ### -------------------------------------------------------------------------------- /further_reading.md: -------------------------------------------------------------------------------- 1 | ## Further Reading 2 | 3 | Graphical User Interface (GUI) Reading Guide - http://www.linux.org/threads/gui-reading-guide.6471/ 4 | 5 | Icon Theme Specification - http://www.freedesktop.org/wiki/Specifications/icon-theme-spec/ 6 | 7 | Icon Naming Specification - http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html 8 | 9 | Icon Theme Specification (single page) - http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html 10 | 11 | Tango Icon Library - http://tango.freedesktop.org/Tango_Icon_Library 12 | 13 | Tango Icon Theme Guidelines - http://tango.freedesktop.org/Generic_Icon_Theme_Guidelines 14 | -------------------------------------------------------------------------------- /getting_started.md: -------------------------------------------------------------------------------- 1 | ## Tools Required/Helpful 2 | 3 | 1. **GtkInspector** 4 | ![Gtk inspector](_media/gtk_inspector.png) 5 | This is a must have tool if you want to make gtk themes or style gtk apps. GtkInspector is the built-in interactive debugging support in GTK+. It was added in GTK+ 3.14, based on a copy of the well-estabished gtkparasite. This tool is integerated natively into gnome desktop environment but disabled by default. To use this you need to follow these steps : 6 | 7 | ```sh 8 | gsettings set org.gtk.Settings.Debug enable-inspector-keybinding true 9 | ``` 10 | launch it by pressing on the keyboard Control-Shift-I or Control-Shift-D. 11 | If you don't want to use the shortcuts, you can also run it temporarily directly when running your app with: 12 | 13 | ```sh 14 | GTK_DEBUG=interactive your-app 15 | ``` 16 | If you get `No such schema 'org.gtk.Settings.Debug'` then install the `libgtk-3-dev` dependency by using 17 | ```sh 18 | sudo apt-get install libgtk-3-dev 19 | ``` 20 | 21 | 2. **Color picker** 22 | ![](_media/color_picker.png) 23 | You can use any color picker you want (gnome-color-picker, elementary color picker, etc.) as long as you have one its fine. 24 | 25 | 3. **Good text editor** - You might want to consider using good text editor for syntax hilighting and auto-complete for faster css. 26 | 27 | 28 | ## Basic Concepts 29 | 30 | The GIMP ToolKit (GTK) is a widget-toolkit used to create GUIs on a variety of systems (thus making GTK cross-platform). GTK (http://www.gtk.org/) is commonly and incorrectly thought to stand for "GNOME ToolKit", but is actually stands for "GIMP ToolKit" because it was first created to design an user interface for GIMP. GTK is an object-oriented toolkit written in C (GTK itself is not a language). GTK is entirely open-source under the LGPL license. GTK is a widely used toolkit for GUIs and many tools are available for GTK. 31 | 32 | Themes made for GTK will not work in Qt-based applications. A Qt-theme is needed to apply a theme to Qt applications. 33 | 34 | The themes use Cascading Style-Sheets (CSS) to generate the theme's appearance. This is the same CSS that web-developers use on web-pages. However, instead of HTML tags being referenced, GTK widgets are specified. It is important that theme developers learn CSS. 35 | 36 | 37 | ## Theme Location 38 | 39 | ```sh 40 | $XDG_CONFIG_HOME/gtk-3.0/gtk.css (typically ~/.config/gtk-3.0/gtk.css) 41 | 42 | 43 | ~/.themes/NAME/gtk-3.0/gtk.css 44 | 45 | 46 | $datadir/share/themes/NAME/gtk-3.0/gtk.css (typically 47 | /usr/share/themes/name/gtk-3.0/gtk.css) 48 | ``` 49 | 50 | ***NOTE***: "**NAME**" is a placeholder for the name of the current theme. 51 | 52 | If there are two themes with the same name, then the one in the user's home folder (~/.themes) will be used. Developers can take advantage of GTK's theme-seeking algorithm by testing new themes in their local home's theme directory. 53 | 54 | 55 | ### Theme Engines 56 | 57 | A "Theme engine" is a piece of software that changes the look of the GUI's widgets. The engine reads and uses the theme's files to know how the various widgets should be drawn. Some engines come with themes of their own. Each engine has its advantages and disadvantages, and some engines add special properties and features. 58 | 59 | Many theme-engines can be obtained from the default repositories. Debian-based Linux distros can execute "apt-get install gtk2-engines-murrine gtk2-engines-pixbuf gtk3-engines-unico" to install three different engines. Many engines are available for both GTK2 and GTK3. Below is a small list of examples. 60 | 61 | - gtk2-engines-aurora - Aurora GTK2 engine 62 | - gtk2-engines-pixbuf - Pixbuf GTK2 engine 63 | - gtk3-engines-oxygen - Engine port of the Oxygen widget style to GTK 64 | - gtk3-engines-unico - Unico GTK3 engine 65 | - gtk3-engines-xfce - GTK3 engine for Xfce 66 | 67 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Gtk Theming Guide 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | # What is this about? 2 | [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I5EGFJ) 3 | #### Ever wanted to learn how to create your own gtk theme? You came to the right place! 4 | 5 | The GTK theme is the overall theme that handles stuff like the panel color, the backgrounds for windows and tabs, how an application will look when it is active vs. inactive, buttons, check-boxes, etc. In most of the desktop environments the theme can be changed or customized to a certain extent and we'll talk about one such instance where well customize gtk themes found in gnome desktop environment and apps using gimp toolkit. 6 | 7 | 8 | ![make it look better](_media/home_img_header.png) 9 | 10 | See the [getting started guide](getting_started.md) for instructions how to get 11 | it up and running. -------------------------------------------------------------------------------- /now.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gtkthemingguide", 3 | "alias": "gtkthemingguide" 4 | } --------------------------------------------------------------------------------