Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Manager, add Autoware logo, update Icon #160

Merged
merged 1 commit into from
Dec 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion ros/src/util/packages/runtime_manager/scripts/rtmgr.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.6.8 on Tue Dec 8 14:24:21 2015
# generated by wxGlade 0.6.8 on Thu Dec 10 18:12:37 2015
#

import wx
Expand Down Expand Up @@ -174,6 +174,7 @@ def __init__(self, *args, **kwds):
self.button_rosbag_topics = wx.ToggleButton(self.tab_topics, wx.ID_ANY, _("ROSBAG"))
self.button_rviz_topics = wx.ToggleButton(self.tab_topics, wx.ID_ANY, _("Rviz"))
self.button_rqt_topics = wx.ToggleButton(self.tab_topics, wx.ID_ANY, _("RQT"))
self.bitmap_logo = wx.StaticBitmap(self, wx.ID_ANY, wx.NullBitmap)

self.__set_properties()
self.__do_layout()
Expand Down Expand Up @@ -664,6 +665,7 @@ def __do_layout(self):
sizer_29.Add((0, 100), 0, wx.EXPAND, 0)
sizer_29.Add(self.sizer_cpuinfo, 1, wx.EXPAND, 0)
self.sizer_1.Add(sizer_29, 0, wx.EXPAND, 0)
self.sizer_1.Add(self.bitmap_logo, 0, 0, 0)
self.SetSizer(self.sizer_1)
self.Layout()
# end wxGlade
Expand Down
9 changes: 8 additions & 1 deletion ros/src/util/packages/runtime_manager/scripts/rtmgr.wxg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<!-- generated by wxGlade 0.6.8 on Tue Dec 8 14:24:21 2015 -->
<!-- generated by wxGlade 0.6.8 on Thu Dec 10 18:12:36 2015 -->

<application path="rtmgr.py" name="app" class="MyApp" option="0" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="2.8" is_template="0" indent_amount="1" indent_symbol="tab" source_extension=".cpp" header_extension=".h">
<object class="MyFrame" name="frame_1" base="EditFrame">
Expand Down Expand Up @@ -2190,6 +2190,13 @@
</object>
</object>
</object>
<object class="sizeritem">
<border>0</border>
<option>0</option>
<object class="wxStaticBitmap" name="bitmap_logo" base="EditStaticBitmap">
<attribute>1</attribute>
</object>
</object>
</object>
</object>
<object class="MyDialog" name="dialog_1" base="EditDialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ def __init__(self, *args, **kwds):
#
self.nodes_dic = self.nodes_dic_get()

self.bitmap_logo.Destroy()
bm = scaled_bitmap(wx.Bitmap(rtmgr_src_dir() + 'autoware_logo_1.png'), 0.2)
self.bitmap_logo = wx.StaticBitmap(self, wx.ID_ANY, bm)

rtmgr.MyFrame.__do_layout(self)

self.alias_grps = [
Expand Down Expand Up @@ -458,7 +462,10 @@ def __init__(self, *args, **kwds):
subprocess.call([ 'mkdir', '-p', path ])

# icon
self.SetIcon( wx.Icon(rtmgr_src_dir() + 'rtmgr_icon.xpm', wx.BITMAP_TYPE_XPM) )
bm = scaled_bitmap(wx.Bitmap(rtmgr_src_dir() + 'autoware_logo_2_white.png'), 0.5)
icon = wx.EmptyIcon()
icon.CopyFromBitmap(bm)
self.SetIcon(icon)

def __do_layout(self):
pass
Expand Down Expand Up @@ -2870,6 +2877,12 @@ def fix_link_color(obj):
elif t is wx.HyperlinkCtrl:
obj.SetVisitedColour(obj.GetNormalColour())

def scaled_bitmap(bm, scale):
(w, h) = bm.GetSize()
img = wx.ImageFromBitmap(bm)
img = img.Scale(w * scale, h * scale, wx.IMAGE_QUALITY_HIGH)
return wx.BitmapFromImage(img)

def sizer_wrap(add_objs, orient=wx.VERTICAL, prop=0, flag=0, border=0, parent=None):
szr = wx.BoxSizer(orient)
for obj in add_objs:
Expand Down