X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaGui.ml;h=2844aa92e5ce6b8666369e5aa4a549ed603ed851;hb=f7759f86b755f4f7dc2b23edd52ed4d2e5c028fe;hp=f6cdff77d86b6798b6403b3155f19e1dd9fff811;hpb=0a9583936e33eb9d65361537fd1e05168d423d11;p=helm.git diff --git a/helm/matita/matitaGui.ml b/helm/matita/matitaGui.ml index f6cdff77d..2844aa92e 100644 --- a/helm/matita/matitaGui.ml +++ b/helm/matita/matitaGui.ml @@ -225,6 +225,20 @@ class gui () = let buf = self#main#scriptTextView#buffer in buf#insert ~iter:(buf#get_iter_at_mark `INSERT) "\n"; advance ()); + (* script monospace font stuff *) + let font = + Helm_registry.get_opt_default Helm_registry.get + BuildTimeConf.default_script_font "matita.script_font" + in +(* let monospace_tag = + self#main#scriptTextView#buffer#create_tag [`FONT_DESC font] + in *) + self#main#scriptTextView#misc#modify_font_by_name font; +(* let _ = + self#main#scriptTextView#buffer#connect#changed ~callback:(fun _ -> + let start, stop = self#main#scriptTextView#buffer#bounds in + self#main#scriptTextView#buffer#apply_tag monospace_tag start stop) + in *) (* debug menu *) self#main#debugMenu#misc#hide (); (* status bar *) @@ -232,7 +246,15 @@ class gui () = self#main#hintMediumImage#set_file "icons/matita-bulb-medium.png"; self#main#hintHighImage#set_file "icons/matita-bulb-high.png"; (* focus *) - self#main#scriptTextView#misc#grab_focus () + self#main#scriptTextView#misc#grab_focus (); + (* main win dimension *) + let width = Gdk.Screen.width () in + let height = Gdk.Screen.height () in + let main_w = width * 90 / 100 in + let main_h = height * 80 / 100 in + let script_w = main_w / 2 in + self#main#toplevel#resize ~width:main_w ~height:main_h; + self#main#hpaneScriptSequent#set_position script_w method loadScript file = let script = MatitaScript.instance () in