diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index e20d9d1..0e96af1 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -627,6 +627,14 @@ type TEditerAuxiliary=class(TPage) // //FFileFindeItem := CreateApageItem(); OnSelChanged := thisfunction(OnSelChangedCall); CloseBtn := true; + onnotification := function(o,e)begin + ms := e.message; + if ifarray(ms) and ms[0] ="font" then + begin + font := ms[1]; + InValidateRect(nil,false); + end + end end function WMNCLBUTTONDOWN(o,e):WM_NCLBUTTONDOWN;override; begin @@ -1725,7 +1733,7 @@ type TEditer=class(TCustomcontrol) // FInfoShowWnd := new TEditerAuxiliary(self); FPageEditer := new TPageEditer(self); FPageEditer.onscrollfont := function(o,ft)begin - + self.Notification(self,array("font",ft)); FinCodemap.FTree.font := ft; FinCodemap.FTree.ItemHeight := ft["height"]+6; end @@ -5653,6 +5661,13 @@ type TFindListWnd=class(TListBox) // function Create(AOwner); begin inherited; + onnotification := function(o,e)begin + ms := e.message; + if ifarray(ms) and ms[0] ="font" then + begin + font := ms[1]; + end + end end function CheckListItem(s);override; begin diff --git a/designer/utslvcldebuger.tsf b/designer/utslvcldebuger.tsf index 9811f7c..a9ea11f 100644 --- a/designer/utslvcldebuger.tsf +++ b/designer/utslvcldebuger.tsf @@ -799,6 +799,19 @@ type TTslDebuga=class(TCustomControl) begin return 1; end + onnotification := function(o,e)begin + if not (FStackList and FVaraiblesList) then return ; + ms := e.message; + if ifarray(ms) and ms[0] ="font" then + begin + ft := ms[1]; + FStackList.font := ft; + FStackList.ItemHeight := ft["height"]+6; + FVaraiblesList.font := ft; + FVaraiblesList.ItemHeight := ft["height"]+6; + //font := ms[1]; + end + end end function addbreak(item,idx,n); //添加断点 begin diff --git a/funcext/tvclib/ugtkinterface.tsf b/funcext/tvclib/ugtkinterface.tsf index 742924a..4745974 100644 --- a/funcext/tvclib/ugtkinterface.tsf +++ b/funcext/tvclib/ugtkinterface.tsf @@ -2249,17 +2249,8 @@ type tsgtkapi = class(tgtkapis) begin global g_open_file_flag; /////////////////////////////////////////////// - GTK_RESPONSE_HELP := -11; - GTK_RESPONSE_APPLY := -10; - GTK_RESPONSE_NO := -9; - GTK_RESPONSE_YES := -8; - GTK_RESPONSE_CLOSE := -7; GTK_RESPONSE_CANCEL := -6; - GTK_RESPONSE_OK := -5; - GTK_RESPONSE_DELETE_EVENT := -4; GTK_RESPONSE_ACCEPT := -3; - GTK_RESPONSE_REJECT := -2; - GTK_RESPONSE_NONE := -1; ///////////////////////////////////////// r := false; obj := new TtagOFNA_(LPOPENFILENAMEA); @@ -2483,24 +2474,15 @@ type tsgtkapi = class(tgtkapis) begin /////////////////////////////////////////////// - GTK_RESPONSE_HELP := -11; - GTK_RESPONSE_APPLY := -10; - GTK_RESPONSE_NO := -9; - GTK_RESPONSE_YES := -8; - GTK_RESPONSE_CLOSE := -7; GTK_RESPONSE_CANCEL := -6; - GTK_RESPONSE_OK := -5; - GTK_RESPONSE_DELETE_EVENT := -4; GTK_RESPONSE_ACCEPT := -3; - GTK_RESPONSE_REJECT := -2; - GTK_RESPONSE_NONE := -1; ///////////////////////////////////////// obj := new TBrowseinfoA_(LPITEMIDLIST); wd := obj._getvalue_("hwndowner"); wd := wd?:nil; if wd and not(gtk_widget_is_toplevel(wd)) then wd := gtk_widget_get_toplevel(wd); //top level r := 0; - cdlg := gtk_file_chooser_dialog_new("folder selector",wd,3,"open",GTK_RESPONSE_ACCEPT,"cancel",GTK_RESPONSE_CANCEL,nil); + cdlg := gtk_file_chooser_dialog_new("folder selector",wd,2,"open",GTK_RESPONSE_ACCEPT,"cancel",GTK_RESPONSE_CANCEL,0); dir := obj._getvalue_("pidlroot"); if dir then //默认位置 begin @@ -6401,8 +6383,7 @@ type tgtk_ctl_scroll_window = class(tgtk_ctl_object) w := makelong(_const.SB_THUMBTRACK,0); CallTslVclProc(_const.WM_VSCROLL,w,0,1); end - static fstaticchanged; - function GtkEventDispatch(a,mn,c,d);override; + {function GtkEventDispatch_(a,mn,c,d);override; //原有的消息处理 begin //消息分发 if mn="scroll-event" then @@ -6412,7 +6393,7 @@ type tgtk_ctl_scroll_window = class(tgtk_ctl_object) nt := now(); if (nt-(1/24/3600/100))0 and dr<>1 then return ; + x := ed.x_root; + y := ed.y_root; + r := array(); + _wapi.GetTopWidgetList(h,x,y,r); + lenr := length(r)-1; + for i := lenr downto 0 do + begin + ri := r[i][0]; + rxy := r[i][1]; + fv := _wapi.g_object_get_data(ri,"gtk_window_vscroll_bar"); + if fv and _wapi.gtk_widget_is_visible(fv) then + begin + ifdowheel := true; + break; + end + end + if not ifdowheel then + begin + ri := r[lenr][0]; + rxy := r[lenr][1]; + end + if ri and rxy then + begin + if not ftimerobj then + begin + fscrollinfos := array(); + Fscrolltimedo := makeinstance(thisfunction(scrolltimedo)); + ftimerobj := new ttmstruct(nil); + rt := _wapi.g_timeout_add(8,Fscrolltimedo,ftimerobj._getptr_() ); + ftimerobj._setvalue_(0,rt); + end + FStatscrollTime := now(); //当前时间 + xy := makelong(rxy[0],rxy[1]); + WHEEL_DELTA := 120; + dr := (dr=1)?(-WHEEL_DELTA):(WHEEL_DELTA); + fscrollinfos[length(fscrollinfos)] := array(ri,dr,xy); + return true; + end + end + return inherited; end function Destroy();override; begin @@ -6803,12 +6873,6 @@ type tGtkMessageQueue=class // begin Clean(); end - ///////////////处理一下//////////////// - if r and r[1]=0x020a then - begin - - end - /////////////////////// unlock(); return r; end