Skip to content

Commit

Permalink
Remove Hardcoded Icons from Drawing and Mesh WB
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrogan authored and yorikvanhavre committed Sep 9, 2015
1 parent 25b501e commit 8cfc4b6
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 120 deletions.
9 changes: 9 additions & 0 deletions src/Mod/Drawing/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ fc_target_copy_resource(DrawingGui
${CMAKE_BINARY_DIR}/Mod/Drawing
InitGui.py)

SET(DrawingGuiIcon_SVG
Resources/icons/actions/drawing-landscape.svg
)

fc_copy_sources(DrawingGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Drawing" ${DrawingGuiIcon_SVG})

INSTALL(FILES ${DrawingGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Resources/icons/actions")


SET_BIN_DIR(DrawingGui DrawingGui /Mod/Drawing)
SET_PYTHON_PREFIX_SUFFIX(DrawingGui)

Expand Down
90 changes: 11 additions & 79 deletions src/Mod/Drawing/InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,87 +30,19 @@
#***************************************************************************/


class DrawingWorkbench (Workbench):
"Drawing workbench object"
def __init__(self):
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Drawing/Resources/icons/actions/drawing-landscape.svg"
self.__class__.MenuText = "Drawing"
self.__class__.ToolTip = "Drawing workbench"

class DrawingWorkbench ( Workbench ):
"Drawing workbench object"
Icon = """
/* XPM */
static const char *colors[]={
"16 16 49 1",
"Qt c None",
". c #B0B0B0",
"+ c #C8C8C8",
"@ c #CACACA",
"# c #CBCBCB",
"$ c #CDCDCD",
"% c #D0D0D0",
"& c #D1D1D1",
"* c #D2D2D2",
"= c #D3D3D3",
"- c #D4D4D4",
"; c #D7D7D7",
"> c #D8D8D8",
", c #E6E6E6",
"' c #E7E7E7",
") c #E5E5E5",
"! c #E0E0E0",
"~ c #E4E4E4",
"{ c #DEDEDE",
"] c #E1E1E1",
"^ c #DADADA",
"/ c #CCCCCC",
"( c #EAEAEA",
"_ c #EBEBEB",
": c #E9E9E9",
"< c #E8E8E8",
"[ c #E2E2E2",
"} c #DDDDDD",
"| c #ECECEC",
"1 c #DBDBDB",
"2 c #EEEEEE",
"3 c #EDEDED",
"4 c #E3E3E3",
"5 c #F0F0F0",
"6 c #F1F1F1",
"7 c #EFEFEF",
"8 c #F2F2F2",
"9 c #F3F3F3",
"0 c #D6D6D6",
"a c #F4F4F4",
"b c #F5F5F5",
"c c #F7F7F7",
"d c #F6F6F6",
"e c #F8F8F8",
"f c #F9F9F9",
"g c #CFCFCF",
"h c #B3B3B3",
"i c #CECECE",
"j c #BBBBBB",
" ",
" ",
" .+@#$%&*=-;>>$ ",
" #,'')!)~{!]!{^ ",
" /(___(::<',~[} ",
" /||||_(:<')~[1 ",
" /22223|_(<')4^ ",
" $5665723_(<,~; ",
" $89986523_:')0 ",
" /abba9673|(<)- ",
" $bccda852|(<,* ",
" $defcb852|(<,% ",
" /bccda852|(<,g ",
" hggggiiigiiiij ",
" ",
" "};
"""
MenuText = "Drawing"
ToolTip = "Drawing workbench"

def Initialize(self):
# load the module
import DrawingGui
def GetClassName(self):
return "DrawingGui::Workbench"
def Initialize(self):
# load the module
import DrawingGui
def GetClassName(self):
return "DrawingGui::Workbench"

Gui.addWorkbench(DrawingWorkbench())

Expand Down
9 changes: 9 additions & 0 deletions src/Mod/Mesh/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ fc_target_copy_resource(MeshGui
${CMAKE_BINARY_DIR}/Mod/Mesh
InitGui.py)

SET(MeshGuiIcon_SVG
Resources/icons/Tree_Mesh.svg
)

fc_copy_sources(MeshGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Mesh" ${MeshGuiIcon_SVG})

INSTALL(FILES ${MeshGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Mesh/Resources/icons")


SET_BIN_DIR(MeshGui MeshGui /Mod/Mesh)
SET_PYTHON_PREFIX_SUFFIX(MeshGui)

Expand Down
53 changes: 12 additions & 41 deletions src/Mod/Mesh/InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,17 @@
#***************************************************************************/


class MeshWorkbench (Workbench):
"Mesh workbench object"
def __init__(self):
self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Mesh/Resources/icons/Tree_Mesh.svg"
self.__class__.MenuText = "Mesh Design"
self.__class__.ToolTip = "Mesh design workbench"

class MeshWorkbench ( Workbench ):
"Mesh workbench object"
Icon = """
/* XPM */
static char * mesh_xpm[] = {
"16 16 9 1",
" c None",
". c #000200",
"+ c #002001",
"@ c #003A00",
"# c #006500",
"$ c #018400",
"% c #00B000",
"& c #00CD00",
"* c #00F600",
" ",
" .. ",
" .... .. ",
" ..&$@. .. ",
" .&+&**. .$. ",
" .&*+&**.. .*+ ",
" .&*+&**.. .&$. ",
" .**@&**.+..%%. ",
" .**@%**.@$@$&. ",
" .**@#%&.@#$#*. ",
" .*%.....@#&.&. ",
" .$. .+@*#.. ",
" .. .+**+. ",
" . .+*&@. ",
" .+@.. ",
" .. "};
"""
MenuText = "Mesh design"
ToolTip = "Mesh design workbench"
def Initialize(self):
import Mesh
import MeshGui
def GetClassName(self):
return "MeshGui::Workbench"

def Initialize(self):
# load the module
import MeshGui
def GetClassName(self):
return "MeshGui::Workbench"

Gui.addWorkbench(MeshWorkbench)
Gui.addWorkbench(MeshWorkbench())

0 comments on commit 8cfc4b6

Please sign in to comment.