• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

ギコナビ


Commit MetaInfo

Revisiona4c33bf56d70e3a77704ccbe73211d4417fb8c15 (tree)
Time2007-05-27 22:11:20
Authorh677 <h677>
Commiterh677

Log Message

レスポップアップ位置の中央を廃止、デフォルトを右上に変更
レスポップアップ位置の補正を強化

Change Summary

Incremental Difference

--- a/Option.dfm
+++ b/Option.dfm
@@ -1,6 +1,6 @@
11 object OptionDialog: TOptionDialog
2- Left = 290
3- Top = 147
2+ Left = 417
3+ Top = 435
44 BorderStyle = bsDialog
55 Caption = #12458#12503#12471#12519#12531
66 ClientHeight = 428
@@ -953,25 +953,6 @@ object OptionDialog: TOptionDialog
953953 object TabSheet1: TTabSheet
954954 Caption = #12473#12524#12483#12489#65298
955955 ImageIndex = 7
956- object PopupPositionRadioGroup: TRadioGroup
957- Left = 12
958- Top = 8
959- Width = 477
960- Height = 85
961- Caption = #12524#12473#12509#12483#12503#12450#12483#12503#34920#31034'(&P)'
962- Columns = 3
963- Items.Strings = (
964- #24038#19978
965- #24038
966- #24038#19979
967- #19978
968- #20013#22830
969- #19979
970- #21491#19978
971- #21491
972- #21491#19979#65288#12487#12501#12457#12523#12488#65289)
973- TabOrder = 0
974- end
975956 object TabAddRadioGroup: TRadioGroup
976957 Left = 12
977958 Top = 288
@@ -984,7 +965,7 @@ object OptionDialog: TOptionDialog
984965 #19968#30058#26368#24460
985966 #29694#22312#12398#21491
986967 #29694#22312#12398#24038)
987- TabOrder = 3
968+ TabOrder = 2
988969 end
989970 object GroupBox8: TGroupBox
990971 Left = 12
@@ -992,7 +973,7 @@ object OptionDialog: TOptionDialog
992973 Width = 477
993974 Height = 105
994975 Caption = #30011#20687#12503#12524#12499#12517#12540#12509#12483#12503#12450#12483#12503
995- TabOrder = 2
976+ TabOrder = 1
996977 object Label14: TLabel
997978 Left = 12
998979 Top = 48
@@ -1055,7 +1036,7 @@ object OptionDialog: TOptionDialog
10551036 Width = 477
10561037 Height = 69
10571038 Caption = #12524#12473#12509#12483#12503#12450#12483#12503#34920#31034#35373#23450
1058- TabOrder = 1
1039+ TabOrder = 0
10591040 object UnActivePopupCheckBox: TCheckBox
10601041 Left = 12
10611042 Top = 20
@@ -1073,6 +1054,78 @@ object OptionDialog: TOptionDialog
10731054 TabOrder = 1
10741055 end
10751056 end
1057+ object GroupBox24: TGroupBox
1058+ Left = 11
1059+ Top = 10
1060+ Width = 478
1061+ Height = 81
1062+ Caption = #12524#12473#12509#12483#12503#12450#12483#12503#34920#31034'(&P)'
1063+ TabOrder = 3
1064+ object gppRightTopRB: TRadioButton
1065+ Left = 324
1066+ Top = 19
1067+ Width = 120
1068+ Height = 20
1069+ Caption = #21491#19978#65288#12487#12501#12457#12523#12488#65289
1070+ TabOrder = 0
1071+ end
1072+ object gppTopRB: TRadioButton
1073+ Left = 170
1074+ Top = 19
1075+ Width = 120
1076+ Height = 20
1077+ Caption = #19978
1078+ TabOrder = 1
1079+ end
1080+ object gppLeftTopRB: TRadioButton
1081+ Left = 8
1082+ Top = 19
1083+ Width = 120
1084+ Height = 20
1085+ Caption = #24038#19978
1086+ TabOrder = 2
1087+ end
1088+ object gppLeftRB: TRadioButton
1089+ Left = 8
1090+ Top = 39
1091+ Width = 120
1092+ Height = 20
1093+ Caption = #24038
1094+ TabOrder = 3
1095+ end
1096+ object gppRightRB: TRadioButton
1097+ Left = 324
1098+ Top = 39
1099+ Width = 120
1100+ Height = 20
1101+ Caption = #21491
1102+ TabOrder = 4
1103+ end
1104+ object gppLeftBottomRB: TRadioButton
1105+ Left = 8
1106+ Top = 59
1107+ Width = 120
1108+ Height = 20
1109+ Caption = #24038#19979
1110+ TabOrder = 5
1111+ end
1112+ object gppBottomRB: TRadioButton
1113+ Left = 170
1114+ Top = 59
1115+ Width = 120
1116+ Height = 20
1117+ Caption = #19979
1118+ TabOrder = 6
1119+ end
1120+ object gppRighBottomRB: TRadioButton
1121+ Left = 324
1122+ Top = 59
1123+ Width = 120
1124+ Height = 20
1125+ Caption = #21491#19979
1126+ TabOrder = 7
1127+ end
1128+ end
10761129 end
10771130 object TabSheet2: TTabSheet
10781131 Caption = #12381#12398#20182#21205#20316#65297
--- a/Option.pas
+++ b/Option.pas
@@ -119,7 +119,6 @@ type
119119 ResAnchorGroupBox: TGroupBox;
120120 ResAnchorCheckBox: TCheckBox;
121121 TabSheet1: TTabSheet;
122- PopupPositionRadioGroup: TRadioGroup;
123122 TabAddRadioGroup: TRadioGroup;
124123 GroupBox8: TGroupBox;
125124 Label14: TLabel;
@@ -211,6 +210,15 @@ type
211210 LoopBrowserTabsCB: TCheckBox;
212211 GroupBox23: TGroupBox;
213212 IgnoreContextCheckBox: TCheckBox;
213+ GroupBox24: TGroupBox;
214+ gppRightTopRB: TRadioButton;
215+ gppTopRB: TRadioButton;
216+ gppLeftTopRB: TRadioButton;
217+ gppLeftRB: TRadioButton;
218+ gppRightRB: TRadioButton;
219+ gppLeftBottomRB: TRadioButton;
220+ gppBottomRB: TRadioButton;
221+ gppRighBottomRB: TRadioButton;
214222 procedure FormCreate(Sender: TObject);
215223 procedure FormDestroy(Sender: TObject);
216224 procedure ApplyButtonClick(Sender: TObject);
@@ -770,15 +778,15 @@ begin
770778 BrowserMaxCombo.ItemIndex := Ord( GikoSys.Setting.BrowserAutoMaximize );
771779 //ƒ|ƒbƒvƒAƒbƒvˆÊ’u
772780 case GikoSys.Setting.PopupPosition of
773- gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
774- gppRight: PopupPositionRadioGroup.ItemIndex := 1;
775- gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
776- gppTop: PopupPositionRadioGroup.ItemIndex := 3;
777- gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
778- gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
779- gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
780- gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
781- gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
781+ gppRightTop: gppRightTopRB.Checked := True;
782+ gppRight: gppRightRB.Checked := True;
783+ gppRightBottom: gppRighBottomRB.Checked := True;
784+ gppTop: gppTopRB.Checked := True;
785+ gppCenter: gppTopRB.Checked := True; // “ǂݍž‚Ý‚Å•ÏŠ·‚µ‚Ä‚é‚Í‚¸
786+ gppBottom: gppBottomRB.Checked := True;
787+ gppLeftTop: gppLeftTopRB.Checked := True;
788+ gppLeft: gppLeftRB.Checked := True;
789+ gppLeftBottom: gppLeftBottomRB.Checked := True;
782790 end;
783791
784792 //”ñƒAƒNƒeƒBƒuŽžƒ|ƒbƒvƒAƒbƒv•\Ž¦
@@ -1033,18 +1041,14 @@ begin
10331041 // ƒuƒ‰ƒEƒUÅ‘剻
10341042 GikoSys.Setting.BrowserAutoMaximize := TGikoBrowserAutoMaximize( BrowserMaxCombo.ItemIndex );
10351043 //ƒ|ƒbƒvƒAƒbƒvˆÊ’u
1036- case PopupPositionRadioGroup.ItemIndex of
1037- 0: GikoSys.Setting.PopupPosition := gppRightTop;
1038- 1: GikoSys.Setting.PopupPosition := gppRight;
1039- 2: GikoSys.Setting.PopupPosition := gppRightBottom;
1040- 3: GikoSys.Setting.PopupPosition := gppTop;
1041- 4: GikoSys.Setting.PopupPosition := gppCenter;
1042- 5: GikoSys.Setting.PopupPosition := gppBottom;
1043- 6: GikoSys.Setting.PopupPosition := gppLeftTop;
1044- 7: GikoSys.Setting.PopupPosition := gppLeft;
1045- 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
1046- end;
1047-
1044+ if (gppRightTopRB.Checked) then GikoSys.Setting.PopupPosition := gppRightTop;
1045+ if (gppRightRB.Checked) then GikoSys.Setting.PopupPosition := gppRight;
1046+ if (gppRighBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppRightBottom;
1047+ if (gppTopRB.Checked) then GikoSys.Setting.PopupPosition := gppTop;
1048+ if (gppBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppBottom;
1049+ if (gppLeftTopRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftTop;
1050+ if (gppLeftRB.Checked) then GikoSys.Setting.PopupPosition := gppLeft;
1051+ if (gppLeftBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftBottom;
10481052 //”ñƒAƒNƒeƒBƒuŽžƒ|ƒbƒvƒAƒbƒv•\Ž¦
10491053 GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
10501054 //ƒŒƒXƒ|ƒbƒvƒAƒbƒvƒ{[ƒ‹ƒh•\Ž¦
--- a/ResPopupBrowser.pas
+++ b/ResPopupBrowser.pas
@@ -112,7 +112,6 @@ begin
112112 FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;
113113 SetWindowPos(FChild.Handle, HWND_BOTTOM,
114114 0, 0, 0 , 0,
115-// SWP_NOZORDER or
116115 SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
117116 Result := FChild;
118117 end;
@@ -125,7 +124,6 @@ begin
125124 Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;
126125 SetWindowPos(Self.Handle, HWND_BOTTOM,
127126 0, 0, 0 , 0,
128-// SWP_NOZORDER or
129127 SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW);
130128 Result := Self;
131129 end;
@@ -262,7 +260,7 @@ function TResPopupBrowser.CalcRect(MaxHeight: Integer; MaxWidth: Integer; Scroll
262260 var
263261 p: TPoint;
264262 ele: IHTMLElement2;
265- h, w: Integer;
263+ h, w, dx1, dx2, dy1, dy2: Integer;
266264 begin
267265 GetCursorpos(p);
268266 ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2);
@@ -273,39 +271,107 @@ begin
273271 h := GetWindowHeight + 5;
274272 w := ele.scrollWidth + 10;
275273 end;
274+
275+ dx1 := 0; dx2 := 0;
276+ dy1 := 0; dy2 := 0;
277+
276278 Result := Rect(0, 0, w, h);
277279 case GikoSys.Setting.PopupPosition of
278- gppRightTop: OffsetRect(Result, p.x - w - 2, p.y - h - 2);
279- gppRight: OffsetRect(Result, p.x - w - 2, p.y - (h div 2));
280- gppRightBottom: OffsetRect(Result, p.x - w -2, p.y + 2);
281- gppTop: OffsetRect(Result, p.x - (w div 2), p.y - h - 2);
282- gppCenter: OffsetRect(Result, p.x - (w div 2), p.y - (h div 2));
283- gppBottom: OffsetRect(Result, p.x - (w div 2), p.y + 2);
284- gppLeftTop: OffsetRect(Result, p.x + 2, p.y - h - 2);
285- gppLeft: OffsetRect(Result, p.x + 2, p.y - (h div 2));
286- gppLeftBottom: OffsetRect(Result, p.x + 2, p.y + 2);
280+ gppRightTop:
281+ begin
282+ dx1 := -w; dx2 := -2;
283+ dy1 := -h; dy2 := -2;
284+ end;
285+ gppRight:
286+ begin
287+ dx1 := -w; dx2 := -2;
288+ dy1 := - (h div 2); dy2 := 0;
289+ end;
290+ gppRightBottom:
291+ begin
292+ dx1 := -w; dx2 := -2;
293+ dy1 := 0; dy2 := +2;
294+ end;
295+ gppTop:
296+ begin
297+ dx1 := - (w div 2); dx2 := 0;
298+ dy1 := -h; dy2 := -2;
299+ end;
300+ // ”pŽ~ gppCenter: OffsetRect(Result, p.x - (w div 2), p.y - (h div 2));
301+ gppBottom:
302+ begin
303+ dx1 := - (w div 2); dx2 := 0;
304+ dy1 := 0; dy2 := +2;
305+ end;
306+ gppLeftTop:
307+ begin
308+ dx1 := 0; dx2 := +2;
309+ dy1 := -h; dy2 := -2;
310+ end;
311+ gppLeft:
312+ begin
313+ dx1 := 0; dx2 := +2;
314+ dy1 := - (h div 2); dy2 := 0;
315+ end;
316+ gppLeftBottom:
317+ begin
318+ dx1 := 0; dx2 := +2;
319+ dy1 := 0; dy2 := +2;
320+ end;
287321 end;
322+ // ‰ŠúˆÊ’u‚Ɉړ®
323+ OffsetRect(Result, p.x + dx1 + dx2, p.y + dy1 + dy2);
324+
325+ // ˆÈ‰ºA‰ŠúˆÊ’u‚É–â‘肪‚ ‚é‚Æ‚«‚̈ړ®
288326 if (Result.Left < 0) then begin
289- OffsetRect(Result, -Result.Left, 0);
327+ // ‹tƒTƒCƒh‚É—]—T‚ª‚ ‚ê‚΁Ao—͈ʒu‚̍¶‰E“]Š·
328+ if (p.X * 2 < MaxWidth) then begin
329+ if ( (GikoSys.Setting.PopupPosition = gppTop) or
330+ (GikoSys.Setting.PopupPosition = gppBottom)) then begin
331+ OffsetRect(Result, -Result.Left, 0);
332+ end else begin
333+ OffsetRect(Result, - (dx1 + 2 * dx2), 0);
334+ end;
335+ end else begin
336+ // ‰æ–Ê’[‚܂ʼnæ–Ê•‚ð¬‚³‚­‚·‚é
337+ Result := Rect(0, Result.Top,
338+ Result.Right, Result.Bottom);
339+ end;
290340 end;
291341 if (Result.Top < 0) then begin
292- OffsetRect(Result, 0, -Result.Top);
342+ // ’ꑤ‚É—]—T‚ª‚ ‚ê‚΁Ao—͈ʒu‚̏㉺“]Š·
343+ if (p.Y * 2 < MaxHeight) then begin
344+ OffsetRect(Result, 0, - (dy1 + 2 * dy2));
345+ end else begin
346+ // ‰æ–Ê’[‚܂ʼnæ–ʍ‚‚ð¬‚³‚­‚·‚é
347+ Result := Rect(Result.Left, 0,
348+ Result.Right, Result.Bottom);
349+ end;
293350 end;
294351 if (Result.Right > MaxWidth) then begin
295- OffsetRect(Result, - (Result.Right - MaxWidth), 0);
352+ // ‹tƒTƒCƒh‚É—]—T‚ª‚ ‚ê‚΁Ao—͈ʒu‚̍¶‰E“]Š·
353+ if (p.X * 2 > MaxWidth) then begin
354+ if( (GikoSys.Setting.PopupPosition = gppTop) or
355+ (GikoSys.Setting.PopupPosition = gppBottom)) then begin
356+ OffsetRect(Result, -(Result.Right - MaxWidth), 0);
357+ end else begin
358+ OffsetRect(Result, -w - (dx1 + 2 * dx2), 0);
359+ end;
360+ end else begin
361+ // ‰æ–Ê’[‚܂ʼnæ–Ê•‚ð¬‚³‚­‚·‚é
362+ Result := Rect(Result.Left, Result.Top,
363+ MaxWidth, Result.Bottom);
364+ end;
296365 end;
297366 if (Result.Bottom > MaxHeight) then begin
298- OffsetRect(Result, 0, - (Result.Bottom - MaxHeight));
299- end;
300-
301- // ‚±‚±‚ōēx¶‚Əã‚ðŠm”F‚µ‚Ä”ò‚яo‚µ‚Ä‚½‚çA‰æ–ʃTƒCƒY‚ð¬‚³‚­‚·‚é
302- if (Result.Left < 0) then begin
303- Result := Rect(0, Result.Top,
304- Result.Right, Result.Bottom);
305- end;
306- if (Result.Top < 0) then begin
307- Result := Rect(Result.Left, 0,
308- Result.Right, Result.Bottom);
367+ // ã‘¤‚É—]—T‚ª‚ ‚ê‚΁Ao—͈ʒu‚̏㉺“]Š·
368+ if (p.Y * 2 > MaxHeight) then begin
369+ OffsetRect(Result, 0, -h - (dy1 + 2 * dy2));
370+ end else begin
371+ // ‰æ–Ê’[‚܂ʼnæ–ʍ‚‚ð¬‚³‚­‚·‚é
372+ Result := Rect(Result.Left, Result.Top,
373+ Result.Right, 0);
374+ end;
309375 end;
310376 end;
311377 function TResPopupBrowser.GetWindowHeight : Integer;
--- a/Setting.pas
+++ b/Setting.pas
@@ -1148,7 +1148,10 @@ begin
11481148
11491149 //ƒ|ƒbƒvƒAƒbƒvˆÊ’u
11501150 FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom)));
1151-
1151+ // ƒoƒ^56ˆÈ‘O‚©‚ç‚̃Aƒbƒvƒf[ƒg‘΍ô
1152+ if (FPopupPosition = gppCenter) then begin
1153+ FPopupPosition := gppTop;
1154+ end;
11521155 //ƒAƒhƒŒƒXƒo[
11531156 FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False);
11541157 FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True);