[glade--]Re: Bug fix for alignment used on buttons with stock icons
Mark Jones <[email protected]>
| Newsgroups | gmane.comp.gnome.glademm |
|---|---|
| Message-ID | <[email protected]> |
Actually, it might need an else statement now that I review what I sent,
so instead it may need to be (I did the modification below by hand to my
previous message, but it was just adding the else clause so I think it
should be very close to correct if not correct):
--- alignment.cc 2003-03-10 00:41:52.000000000 -0500
+++ newAlignment.cc 2003-03-10 00:41:44.000000000 -0500
@@ -28,8 +28,7 @@
Gtk_Alignment();
virtual bool NeedExplicitCtor(const Widget &w) const
{ return false; }
- virtual void ConstructionArgs(Widget const &w, CxxFile &f) const
- { f.FunctionArg(); }
+ virtual void ConstructionArgs(Widget const &w, CxxFile &f) const;
};
static Gtk_Alignment Gtk_Alignment;
@@ -42,6 +41,18 @@
{ return Configuration.GtkmmIncludePath()+"alignment.h";
}
+void Gtk_Alignment::ConstructionArgs(const Widget &w, CxxFile &f) const
+{
+ if( w.hasProperty("xalign") && w.hasProperty("yalign") &&
+ w.hasProperty("xscale") && w.hasProperty("yscale") )
+ {
+ f.FunctionArg() << w.getFloatProperty("xalign");
+ f.FunctionArg() << w.getFloatProperty("yalign");
+ f.FunctionArg() << w.getFloatProperty("xscale");
+ f.FunctionArg() << w.getFloatProperty("yscale");
+ }
+ else
+ {
+ f.FunctionArg();
+ }
+}
+
Gtk_Alignment::Gtk_Alignment()
{ Writer["GtkAlignment"]=this;
}
________________________________________________________________________
--
Mark
http://www.utdallas.edu/~mej017200/