bigboard r7383 - in trunk/bigboard: . stocks/self
- From: marco svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7383 - in trunk/bigboard: . stocks/self
- Date: Wed, 18 Jun 2008 19:47:54 +0000 (UTC)
Author: marco
Date: Wed Jun 18 19:47:53 2008
New Revision: 7383
URL: http://svn.gnome.org/viewvc/bigboard?rev=7383&view=rev
Log:
Remove hardcoded fonts from the self stock.
Added:
trunk/bigboard/stocks/self/portfoliomanager.css
trunk/bigboard/stocks/self/slideout.css
trunk/bigboard/stocks/self/stock.css
Modified:
trunk/bigboard/Makefile.am
trunk/bigboard/stock.py
trunk/bigboard/stocks/self/SelfStock.py
trunk/bigboard/stocks/self/portfoliomanager.py
Modified: trunk/bigboard/Makefile.am
==============================================================================
--- trunk/bigboard/Makefile.am (original)
+++ trunk/bigboard/Makefile.am Wed Jun 18 19:47:53 2008
@@ -67,7 +67,7 @@
searchstock_PYTHON = stocks/search/*.py
selfstockdir=$(stocksdir)/self
-selfstock_PYTHON = stocks/self/*.py
+selfstock_PYTHON = stocks/self/*.py stocks/self/*.css
peoplestockdir=$(stocksdir)/people
peoplestock_PYTHON = stocks/people/*.py stocks/people/*.png stocks/people/*.css
Modified: trunk/bigboard/stock.py
==============================================================================
--- trunk/bigboard/stock.py (original)
+++ trunk/bigboard/stock.py Wed Jun 18 19:47:53 2008
@@ -88,6 +88,9 @@
def get_ticker(self):
return self._ticker
+ def get_panel(self):
+ return self._panel
+
def _add_more_button(self, cb):
self.__more_button_cb = cb
Modified: trunk/bigboard/stocks/self/SelfStock.py
==============================================================================
--- trunk/bigboard/stocks/self/SelfStock.py (original)
+++ trunk/bigboard/stocks/self/SelfStock.py Wed Jun 18 19:47:53 2008
@@ -78,7 +78,7 @@
self.__dispname = hippo.CanvasText(xalign=hippo.ALIGNMENT_END, text=dispname)
self.append(self.__dispname)
- self.__loginname = hippo.CanvasText(xalign=hippo.ALIGNMENT_END, font='10px Italic',
+ self.__loginname = hippo.CanvasText(xalign=hippo.ALIGNMENT_END, id="local-user-name",
text=loginname)
attrs = pango.AttrList()
attrs.insert(pango.AttrForeground(0x6666, 0x6666, 0x6666, 0, 0xFFFF))
@@ -95,7 +95,7 @@
"sidebar-controls" : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, []),
}
def __init__(self, stock, myself, fus=None, logger=None):
- super(SelfSlideout, self).__init__()
+ super(SelfSlideout, self).__init__(stylesheet=stock.get_path('slideout.css'))
vbox = CanvasVBox(spacing=4, padding=4)
self.get_root().append(vbox)
@@ -114,7 +114,7 @@
self.__personal_box_right = CanvasVBox()
self.__personal_box.append(self.__personal_box_right, hippo.PACK_EXPAND)
- self.__name = hippo.CanvasText(font="14px Bold",
+ self.__name = hippo.CanvasText(id="name",
xalign=hippo.ALIGNMENT_START,
yalign=hippo.ALIGNMENT_CENTER,
size_mode=hippo.CANVAS_SIZE_ELLIPSIZE_END)
@@ -126,7 +126,7 @@
self.__personalization_box = CanvasVBox(spacing=2)
vbox.append(self.__personalization_box)
self.__personalization_box.append(hippo.CanvasText(text='Personalization',
- font='12px Bold',
+ classes="menu-group",
xalign=hippo.ALIGNMENT_START))
self.__mugshot_link = IconLink(img_scale_width=22, img_scale_height=22, xalign=hippo.ALIGNMENT_START)
@@ -260,8 +260,7 @@
self._namephoto_box.set_photo(self._photo)
self._namephoto_box_child = CanvasHBox()
- self._name = hippo.CanvasText(text="Nobody", size_mode=hippo.CANVAS_SIZE_ELLIPSIZE_END)
- self._name.set_property("font", "14px Bold")
+ self._name = hippo.CanvasText(text="Nobody", size_mode=hippo.CANVAS_SIZE_ELLIPSIZE_END, classes="name")
self._namephoto_box_child.append(self._name)
self._bulb = hippo.CanvasImage(xalign=hippo.ALIGNMENT_END, yalign=hippo.ALIGNMENT_CENTER)
@@ -324,7 +323,7 @@
except AttributeError, e:
protocol_version = "0"
if Version(protocol_version) > Version(COMPATIBLE_PROTOCOL_VERSION):
- text = hippo.CanvasText(text="Upgrade required", font='14px Bold', border=1, border_color=0xFF0000FF)
+ text = hippo.CanvasText(text="Upgrade required", id="upgrade-required", border=1, border_color=0xFF0000FF)
self._box.append(text)
errorbox = CanvasVBox()
errorbox.append(hippo.CanvasText(text='Upgrade required'))
@@ -368,7 +367,7 @@
# stocks are being manipulated
#self._panel.action_taken()
if not self.__portfolio_manager:
- self.__portfolio_manager = portfoliomanager.PortfolioManager(self._panel)
+ self.__portfolio_manager = portfoliomanager.PortfolioManager(self)
self.__portfolio_manager.present()
def __do_account(self):
Added: trunk/bigboard/stocks/self/portfoliomanager.css
==============================================================================
--- (empty file)
+++ trunk/bigboard/stocks/self/portfoliomanager.css Wed Jun 18 19:47:53 2008
@@ -0,0 +1,12 @@
+.title {
+ font-size: 0.9em;
+ font-weight: bold;
+}
+
+.label {
+ font-size: 0.9em;
+}
+
+#metainfo-description {
+ font-size: 0.9em;
+}
Modified: trunk/bigboard/stocks/self/portfoliomanager.py
==============================================================================
--- trunk/bigboard/stocks/self/portfoliomanager.py (original)
+++ trunk/bigboard/stocks/self/portfoliomanager.py Wed Jun 18 19:47:53 2008
@@ -36,10 +36,11 @@
self.metainfo = metainfo
self.listed = listed
- self.append(hippo.CanvasText(text=self.metainfo.title, font='Bold 12px'))
+ self.append(hippo.CanvasText(text=self.metainfo.title, classes="title"))
if self.metainfo.thumbnail:
self.append(CanvasURLImage(self.metainfo.thumbnail))
- self.append(hippo.CanvasText(text=self.metainfo.description, font="12px", size_mode=hippo.CANVAS_SIZE_WRAP_WORD))
+ self.append(hippo.CanvasText(text=self.metainfo.description, id="metainfo-description",
+ size_mode=hippo.CANVAS_SIZE_WRAP_WORD))
self.__button = Button(label=(self.listed and 'Remove from Sidebar' or 'Add to Sidebar'))
self.__button.set_property('padding', 5)
self.__button.connect('activated', lambda *args: self.emit('add-remove'))
@@ -66,7 +67,7 @@
self.set_clickable(True)
- self.append(hippo.CanvasText(text=metainfo.title, font='Bold 12px'))
+ self.append(hippo.CanvasText(text=metainfo.title, classes="title"))
if metainfo.thumbnail:
box = CanvasVBox()
box.append(CanvasURLImage(metainfo.thumbnail, border=1, border_color=0xAAAAAAFF, xalign=hippo.ALIGNMENT_CENTER, yalign=hippo.ALIGNMENT_CENTER))
@@ -192,10 +193,10 @@
self.add_stock(metainfo, UNLISTED)
class PortfolioManager(BigWindow):
- def __init__(self, panel):
- super(PortfolioManager, self).__init__(themed=False)
+ def __init__(self, stock):
+ super(PortfolioManager, self).__init__(themed=False, stylesheet=stock.get_path('portfoliomanager.css'))
- self.__panel = panel
+ self.__panel = stock.get_panel()
self.__mgr = self.__panel.get_stock_manager()
self.__mgr.connect('listings-changed', lambda *args: self.__on_listings_change())
self.modify_bg(gtk.STATE_NORMAL, gtk.gdk.Color(65535,65535,65535))
@@ -208,7 +209,7 @@
self.__left_box.set_property('background-color', 0xEEEEEEFF)
self.__box.append(self.__left_box)
- self.__search_text = hippo.CanvasText(text="Search All Widgets:", font="Bold 12px",
+ self.__search_text = hippo.CanvasText(text="Search All Widgets:", classes="title",
color=0x3F3F3FFF, xalign=hippo.ALIGNMENT_START)
self.__left_box.append(self.__search_text)
self.__search_input = hippo.CanvasEntry()
@@ -222,7 +223,7 @@
self.__left_box.append(self.__profile_box)
self.__set_profile_stock(None)
- self.__left_box.append(hippo.CanvasText(text="Tools", font="Bold 12px",
+ self.__left_box.append(hippo.CanvasText(text="Tools", classes="title",
color=0x3F3F3FFF, xalign=hippo.ALIGNMENT_START))
minimized_box = CanvasHBox()
self.__minimized_check = CanvasCheckbox("Minimized Sidebar Mode")
@@ -233,7 +234,7 @@
self.__left_box.append(minimized_box)
theme_box = CanvasHBox()
- theme_box.append(hippo.CanvasText(text='Theme: ', font='12px'))
+ theme_box.append(hippo.CanvasText(text='Theme: ', classes="label"))
model = gtk.ListStore(gobject.TYPE_STRING)
model.append(['Milky'])
model.append(['Fedora'])
@@ -274,7 +275,7 @@
self.__right_box = CanvasVBox(border=0, background_color=0xFFFFFFFF)
self.__box.append(self.__right_scroll, hippo.PACK_EXPAND)
- self.__stock_list = StockList(panel=panel)
+ self.__stock_list = StockList(panel=self.__panel)
self.__right_box.append(self.__stock_list, hippo.PACK_EXPAND)
self.__stock_list.connect("selected", self.__on_stock_selected)
Added: trunk/bigboard/stocks/self/slideout.css
==============================================================================
--- (empty file)
+++ trunk/bigboard/stocks/self/slideout.css Wed Jun 18 19:47:53 2008
@@ -0,0 +1,13 @@
+#name {
+ font-weight: bold;
+}
+
+#local-user-name {
+ font-size: 0.7em;
+ font-style: italic;
+}
+
+.menu-group {
+ font-size: 0.9em;
+ font-weight: bold;
+}
Added: trunk/bigboard/stocks/self/stock.css
==============================================================================
--- (empty file)
+++ trunk/bigboard/stocks/self/stock.css Wed Jun 18 19:47:53 2008
@@ -0,0 +1,7 @@
+#name {
+ font-weight: bold;
+}
+
+#upgrade-required {
+ font-weight: bold;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]