[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Bitmaps (was Re: [XaraXtreme-commits] Commit Complete)



Luke,

As a general rule, don't use static bitmaps, use wxCamArtControl. I
promise your life will be easier. Just stick a wxCamArtControl in
there (you shouldn't need any flags, sizes, etc, just the wxCamArtControl
line and an ID), then give PNG the appropriate name in the resources.
Apart from anything else, this means it's compatible with any future
upgrade to vector art providers.

Alex

--On 11 July 2006 12:04 +0100 subversion@xxxxxxxxxxxxxx wrote:

Commit by  : luke
Repository : xara
Revision   : 1428
Date       : Tue Jul 11 12:04:02 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/xrc/EN/prefsdlg-sizer.xrc

Add title area (with bitmap) at top of option dialogs. I'm currently not
seeing the expected bitmaps though, I hope this may just be a out-of-tree
build versus int-tree-build issue


Diff:
Index: Trunk/XaraLX/wxOil/xrc/EN/prefsdlg-sizer.xrc
===================================================================
--- Trunk/XaraLX/wxOil/xrc/EN/prefsdlg-sizer.xrc	(revision 1427)
+++ Trunk/XaraLX/wxOil/xrc/EN/prefsdlg-sizer.xrc	(revision 1428)
@@ -1,17 +1,42 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <resource version="2.3.0.1" xmlns="http://www.wxwidgets.org/wxxrc";>
     <object class="wxPanel" name="IDD_OPTSTAB_VIEW">
         <size>309,305</size>
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-
<flag>wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE</flag> +
<flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="wxID_STATIC">
-                    <label>Window options</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText" name="wxID_STATIC">
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Window options</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_PAGE.png</bitmap> +                        </object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxALIGN_CENTER_HORIZONTAL</flag>
                 <border>5</border>
                 <object class="wxBoxSizer">
@@ -198,8 +223,40 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
+                <flag>wxGROW</flag>
+                <border>5</border>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+
<flag>wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE</flag> +
<border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText" name="wxID_STATIC">
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>General</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_MISC.png</bitmap> +                        </object>
+                    </object>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxGROW|wxALL</flag>
                 <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_MISCGRP1">                      <orient>wxVERTICAL</orient>
                     <label>General options</label>
@@ -437,14 +494,39 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-
<flag>wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE</flag> +
<flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="IDC_OPTS_INFO">
-                    <pos>7,8</pos>
-                    <label>Page layout options for</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText"
name="IDC_OPTS_INFO"> +                            <pos>7,8</pos>
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Page layout options for</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_PAGE.png</bitmap> +                        </object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxGROW|wxLEFT|wxRIGHT|wxBOTTOM</flag>
                 <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_PAGEGROUP"> @@ -452,7 +534,7 @@
                     <label>Paper</label>
                     <object class="sizeritem">
                         <flag>wxGROW</flag>
-						<border>5</border>
+                        <border>5</border>
                         <object class="wxFlexGridSizer">
                             <cols>2</cols>
                             <rows>2</rows>
@@ -460,10 +542,10 @@
                             <hgap>0</hgap>
                             <growablecols>0,1</growablecols>
                             <object class="sizeritem">
-
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL</flag> -
	<border>5</border>
+
<flag>wxGROW|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE</flag> +
<border>5</border>
                                 <object class="wxStaticText"
name="IDC_OPTS_SIZENAME"> -									<label>Paper &amp;size</label>
+                                    <label>Paper &amp;size</label>
                                 </object>
                             </object>
                             <object class="sizeritem">
@@ -559,7 +641,7 @@
                             <vgap>0</vgap>
                             <hgap>0</hgap>
                             <object class="sizeritem">
-
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL</flag> +
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MI
NSIZE</flag>                                  <border>5</border>
                                 <object class="wxStaticText"
name="IDC_OPTS_MARGINTXT">
<pos>15,160</pos>
@@ -644,8 +726,40 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
+                <flag>wxGROW</flag>
+                <border>5</border>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+
<flag>wxALIGN_CENTER_VERTICAL|wxALL|wxADJUST_MINSIZE</flag> +
<border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText" name="wxID_STATIC">
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Tune-ups</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_PAGE.png</bitmap> +                        </object>
+                    </object>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxGROW|wxALL</flag>
                 <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_TUNEGROUP">
<orient>wxVERTICAL</orient>
                     <label>Redraw</label>
@@ -899,14 +1013,39 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-                <flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+                <flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="IDC_OPTS_INFO">
-                    <pos>7,8</pos>
-                    <label>Scaling for</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText"
name="IDC_OPTS_INFO"> +                            <pos>7,8</pos>
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Scaling for</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_SCALE.png</bitmap> +                        </object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxALIGN_LEFT|wxLEFT</flag>
                 <border>10</border>
                 <object class="wxCheckBox"
name="IDC_OPTS_USESCALEFACTOR"> @@ -998,16 +1137,41 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-                <flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+                <flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="IDC_OPTS_INFO">
-                    <pos>7,8</pos>
-                    <label>Mouse options</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText"
name="IDC_OPTS_INFO"> +                            <pos>7,8</pos>
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Mouse options</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_POINTERS.png </bitmap> +
</object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
                 <flag>wxGROW|wxALL</flag>
                 <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_BUTTONGRP">
<orient>wxVERTICAL</orient>
                     <label>Mouse button function</label>
@@ -1122,16 +1286,41 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-                <flag>wxALIGN_LEFT|wxALL|wxADJUST_MINSIZE</flag>
+                <flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="IDC_OPTS_INFO">
-                    <pos>7,8</pos>
-                    <label>Grid and Ruler options for</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText"
name="IDC_OPTS_INFO"> +                            <pos>7,8</pos>
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Grid and Ruler options for</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_GRID.png</bitmap> +                        </object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
                 <flag>wxGROW|wxALL</flag>
                 <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_GRIDGROUP">
<orient>wxHORIZONTAL</orient>
                     <label>Grid and Ruler spacing</label>
@@ -1285,14 +1474,39 @@
         <object class="wxBoxSizer">
             <orient>wxVERTICAL</orient>
             <object class="sizeritem">
-
<flag>wxALIGN_LEFT|wxLEFT|wxRIGHT|wxTOP|wxADJUST_MINSIZE</flag> +
<flag>wxGROW</flag>
                 <border>5</border>
-                <object class="wxStaticText" name="IDC_OPTS_INFO">
-                    <pos>7,8</pos>
-                    <label>Units for</label>
+                <object class="wxBoxSizer">
+                    <orient>wxHORIZONTAL</orient>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_TOP|wxALL|wxADJUST_MINSIZE</flag>
+                        <border>5</border>
+                        <option>1</option>
+                        <object class="wxStaticText"
name="IDC_OPTS_INFO"> +                            <pos>7,8</pos>
+                            <font>
+                                <family>swiss</family>
+                            </font>
+                            <label>Units for</label>
+                        </object>
+                    </object>
+                    <object class="sizeritem">
+                        <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                        <border>5</border>
+                        <object class="wxStaticBitmap"
name="wxID_STATIC"> +
<bitmap>IDD_OPTSTAB_UNITS.png</bitmap> +                        </object>
+                    </object>
                 </object>
             </object>
             <object class="sizeritem">
+                <flag>wxGROW|wxALL</flag>
+                <border>5</border>
+                <object class="wxStaticLine" name="wxID_STATIC">
+                    <style>wxLI_HORIZONTAL</style>
+                </object>
+            </object>
+            <object class="sizeritem">
                 <flag>wxGROW|wxLEFT|wxRIGHT|wxBOTTOM</flag>
                 <border>5</border>
                 <object class="wxStaticBoxSizer"
name="IDC_OPTS_UNITSGROUP">


Xara





Alex