Check-in [ae1d856e69]
Overview
Comment: | Use Gtk3/gdk.Color.parse() as fallback to .get_colormap(), get rid of style copying (was only necessary with the previous theming support IIRC). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ae1d856e695fdb702b39481ebacb423e |
User & Date: | mario on 2015-05-06 00:07:09 |
Other Links: | manifest | tags |
Context
2015-05-06
| ||
00:07 | Fix some print and log statements. check-in: d0a9fca2bd user: mario tags: trunk | |
00:07 | Use Gtk3/gdk.Color.parse() as fallback to .get_colormap(), get rid of style copying (was only necessary with the previous theming support IIRC). check-in: ae1d856e69 user: mario tags: trunk | |
00:05 | Inline copy&paste HTML entity definitions, because they seemingly were also sacrificed at the Python 3 altar. check-in: 6cb923861a user: mario tags: trunk | |
Changes
Modified uikit.py from [baec4be4e9] to [1f0ba0b7e4].
︙ | ︙ | |||
440 441 442 443 444 445 446 | log.UIKIT_EXEC(name) task() uikit.in_idle = False return len(uikit.idle_tasks) > 0 | | | < < > | > > < < < | | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | log.UIKIT_EXEC(name) task() uikit.in_idle = False return len(uikit.idle_tasks) > 0 # Adds background color to widget, # eventually wraps it into a gtk.EventBox, if it needs a container @staticmethod def bg(w, color="", where=["bg"], wrap=1): """ this method should be called after widget creation, and before .add()ing it to container """ if color: # wrap unstylable widgets into EventBox if wrap and not isinstance(w, (gtk.Window, gtk.EventBox)): wrap = gtk.EventBox() wrap.add(w) w = wrap # copy style object, modify settings try: # Gtk2 c = w.get_colormap().alloc_color(color) except: # Gtk3 p, c = gtk.gdk.Color.parse(color) for state in (gtk.STATE_NORMAL, gtk.STATE_SELECTED, gtk.STATE_ACTIVE): w.modify_bg(state, c) # return modified or wrapped widget return w # Create GtkLabel @staticmethod def label(text, size=305, markup=0): |
︙ | ︙ |