Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Statusbar: add extra required widgets (NFC)
Added (to Glade, and with supporting code for the MyPaint runtime): * Color picker button (icon taken from the Inkscape distro; GPL2+) * Previous/next preview indicator (which might evolve a bit) * Add missing Glade icon for the drawing window.
- Loading branch information
Andrew Chadwick
committed
Jul 10, 2013
1 parent
0ffb42b
commit a19c5e0
Showing
8 changed files
with
271 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+144 Bytes
glade/icons/hicolor/16x16/actions/widget-mypaint-brushcolorindicator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+173 Bytes
glade/icons/hicolor/22x22/actions/widget-mypaint-brushcolorindicator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
184 changes: 184 additions & 0 deletions
184
glade/icons/hicolor/scalable/actions/widget-mypaint-brushcolorpickerbutton.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This file is part of MyPaint. | ||
# Copyright (C) 2013 by Andrew Chadwick <a.t.chadwick@gmail.com> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 of the License, or | ||
|
||
|
||
"""Color preview widget / current color indicator, for the status bar.""" | ||
|
||
# TODO: This *might* evolve to a color preview + alpha selector, possibly | ||
# TODO: with a history row taking up the bottom. For now let's draw it at | ||
# TODO: an aspect ratio of about 1:5 and see how users like it. | ||
|
||
|
||
from colors import PreviousCurrentColorAdjuster | ||
|
||
|
||
class BrushColorIndicator (PreviousCurrentColorAdjuster): | ||
"""Previous/Current color adjuster bound to app.brush_color_manager""" | ||
|
||
__gtype_name__ = "MyPaintBrushColorIndicator" | ||
|
||
def __init__(self): | ||
PreviousCurrentColorAdjuster.__init__(self) | ||
self.connect("realize", self._init_color_manager) | ||
|
||
def _init_color_manager(self, widget): | ||
from application import get_app | ||
app = get_app() | ||
mgr = app.brush_color_manager | ||
assert mgr is not None | ||
self.set_color_manager(mgr) | ||
|