ギコナビ
Revision | a4c33bf56d70e3a77704ccbe73211d4417fb8c15 (tree) |
---|---|
Time | 2007-05-27 22:11:20 |
Author | h677 <h677> |
Commiter | h677 |
レスポップアップ位置の中央を廃止、デフォルトを右上に変更
レスポップアップ位置の補正を強化
@@ -1,6 +1,6 @@ | ||
1 | 1 | object OptionDialog: TOptionDialog |
2 | - Left = 290 | |
3 | - Top = 147 | |
2 | + Left = 417 | |
3 | + Top = 435 | |
4 | 4 | BorderStyle = bsDialog |
5 | 5 | Caption = #12458#12503#12471#12519#12531 |
6 | 6 | ClientHeight = 428 |
@@ -953,25 +953,6 @@ object OptionDialog: TOptionDialog | ||
953 | 953 | object TabSheet1: TTabSheet |
954 | 954 | Caption = #12473#12524#12483#12489#65298 |
955 | 955 | 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 | |
975 | 956 | object TabAddRadioGroup: TRadioGroup |
976 | 957 | Left = 12 |
977 | 958 | Top = 288 |
@@ -984,7 +965,7 @@ object OptionDialog: TOptionDialog | ||
984 | 965 | #19968#30058#26368#24460 |
985 | 966 | #29694#22312#12398#21491 |
986 | 967 | #29694#22312#12398#24038) |
987 | - TabOrder = 3 | |
968 | + TabOrder = 2 | |
988 | 969 | end |
989 | 970 | object GroupBox8: TGroupBox |
990 | 971 | Left = 12 |
@@ -992,7 +973,7 @@ object OptionDialog: TOptionDialog | ||
992 | 973 | Width = 477 |
993 | 974 | Height = 105 |
994 | 975 | Caption = #30011#20687#12503#12524#12499#12517#12540#12509#12483#12503#12450#12483#12503 |
995 | - TabOrder = 2 | |
976 | + TabOrder = 1 | |
996 | 977 | object Label14: TLabel |
997 | 978 | Left = 12 |
998 | 979 | Top = 48 |
@@ -1055,7 +1036,7 @@ object OptionDialog: TOptionDialog | ||
1055 | 1036 | Width = 477 |
1056 | 1037 | Height = 69 |
1057 | 1038 | Caption = #12524#12473#12509#12483#12503#12450#12483#12503#34920#31034#35373#23450 |
1058 | - TabOrder = 1 | |
1039 | + TabOrder = 0 | |
1059 | 1040 | object UnActivePopupCheckBox: TCheckBox |
1060 | 1041 | Left = 12 |
1061 | 1042 | Top = 20 |
@@ -1073,6 +1054,78 @@ object OptionDialog: TOptionDialog | ||
1073 | 1054 | TabOrder = 1 |
1074 | 1055 | end |
1075 | 1056 | 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 | |
1076 | 1129 | end |
1077 | 1130 | object TabSheet2: TTabSheet |
1078 | 1131 | Caption = #12381#12398#20182#21205#20316#65297 |
@@ -119,7 +119,6 @@ type | ||
119 | 119 | ResAnchorGroupBox: TGroupBox; |
120 | 120 | ResAnchorCheckBox: TCheckBox; |
121 | 121 | TabSheet1: TTabSheet; |
122 | - PopupPositionRadioGroup: TRadioGroup; | |
123 | 122 | TabAddRadioGroup: TRadioGroup; |
124 | 123 | GroupBox8: TGroupBox; |
125 | 124 | Label14: TLabel; |
@@ -211,6 +210,15 @@ type | ||
211 | 210 | LoopBrowserTabsCB: TCheckBox; |
212 | 211 | GroupBox23: TGroupBox; |
213 | 212 | 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; | |
214 | 222 | procedure FormCreate(Sender: TObject); |
215 | 223 | procedure FormDestroy(Sender: TObject); |
216 | 224 | procedure ApplyButtonClick(Sender: TObject); |
@@ -770,15 +778,15 @@ begin | ||
770 | 778 | BrowserMaxCombo.ItemIndex := Ord( GikoSys.Setting.BrowserAutoMaximize ); |
771 | 779 | //|bvAbvÊu |
772 | 780 | 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; | |
782 | 790 | end; |
783 | 791 | |
784 | 792 | //ñANeBu|bvAbv\¦ |
@@ -1033,18 +1041,14 @@ begin | ||
1033 | 1041 | // uEUÅå» |
1034 | 1042 | GikoSys.Setting.BrowserAutoMaximize := TGikoBrowserAutoMaximize( BrowserMaxCombo.ItemIndex ); |
1035 | 1043 | //|bvAbvÊ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; | |
1048 | 1052 | //ñANeBu|bvAbv\¦ |
1049 | 1053 | GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked; |
1050 | 1054 | //X|bvAbv{[h\¦ |
@@ -112,7 +112,6 @@ begin | ||
112 | 112 | FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
113 | 113 | SetWindowPos(FChild.Handle, HWND_BOTTOM, |
114 | 114 | 0, 0, 0 , 0, |
115 | -// SWP_NOZORDER or | |
116 | 115 | SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW); |
117 | 116 | Result := FChild; |
118 | 117 | end; |
@@ -125,7 +124,6 @@ begin | ||
125 | 124 | Self.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
126 | 125 | SetWindowPos(Self.Handle, HWND_BOTTOM, |
127 | 126 | 0, 0, 0 , 0, |
128 | -// SWP_NOZORDER or | |
129 | 127 | SWP_NOSIZE or SWP_NOMOVE or SWP_NOACTIVATE or SWP_HIDEWINDOW); |
130 | 128 | Result := Self; |
131 | 129 | end; |
@@ -262,7 +260,7 @@ function TResPopupBrowser.CalcRect(MaxHeight: Integer; MaxWidth: Integer; Scroll | ||
262 | 260 | var |
263 | 261 | p: TPoint; |
264 | 262 | ele: IHTMLElement2; |
265 | - h, w: Integer; | |
263 | + h, w, dx1, dx2, dy1, dy2: Integer; | |
266 | 264 | begin |
267 | 265 | GetCursorpos(p); |
268 | 266 | ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2); |
@@ -273,39 +271,107 @@ begin | ||
273 | 271 | h := GetWindowHeight + 5; |
274 | 272 | w := ele.scrollWidth + 10; |
275 | 273 | end; |
274 | + | |
275 | + dx1 := 0; dx2 := 0; | |
276 | + dy1 := 0; dy2 := 0; | |
277 | + | |
276 | 278 | Result := Rect(0, 0, w, h); |
277 | 279 | 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; | |
287 | 321 | end; |
322 | + // úÊuÉÚ® | |
323 | + OffsetRect(Result, p.x + dx1 + dx2, p.y + dy1 + dy2); | |
324 | + | |
325 | + // ȺAúÊuÉâèª éÆ«ÌÚ® | |
288 | 326 | if (Result.Left < 0) then begin |
289 | - OffsetRect(Result, -Result.Left, 0); | |
327 | + // tTChÉ]Tª êÎAoÍÊ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 | + // æÊ[ÜÅæÊ𬳷é | |
337 | + Result := Rect(0, Result.Top, | |
338 | + Result.Right, Result.Bottom); | |
339 | + end; | |
290 | 340 | end; |
291 | 341 | if (Result.Top < 0) then begin |
292 | - OffsetRect(Result, 0, -Result.Top); | |
342 | + // ê¤É]Tª êÎAoÍÊuÌãº]· | |
343 | + if (p.Y * 2 < MaxHeight) then begin | |
344 | + OffsetRect(Result, 0, - (dy1 + 2 * dy2)); | |
345 | + end else begin | |
346 | + // æÊ[ÜÅæÊ𬳷é | |
347 | + Result := Rect(Result.Left, 0, | |
348 | + Result.Right, Result.Bottom); | |
349 | + end; | |
293 | 350 | end; |
294 | 351 | if (Result.Right > MaxWidth) then begin |
295 | - OffsetRect(Result, - (Result.Right - MaxWidth), 0); | |
352 | + // tTChÉ]Tª êÎAoÍÊ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 | + // æÊ[ÜÅæÊ𬳷é | |
362 | + Result := Rect(Result.Left, Result.Top, | |
363 | + MaxWidth, Result.Bottom); | |
364 | + end; | |
296 | 365 | end; |
297 | 366 | if (Result.Bottom > MaxHeight) then begin |
298 | - OffsetRect(Result, 0, - (Result.Bottom - MaxHeight)); | |
299 | - end; | |
300 | - | |
301 | - // ±±ÅÄx¶ÆãðmFµÄòÑoµÄ½çAæÊTCY𬳷é | |
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ª êÎAoÍÊuÌãº]· | |
368 | + if (p.Y * 2 > MaxHeight) then begin | |
369 | + OffsetRect(Result, 0, -h - (dy1 + 2 * dy2)); | |
370 | + end else begin | |
371 | + // æÊ[ÜÅæÊ𬳷é | |
372 | + Result := Rect(Result.Left, Result.Top, | |
373 | + Result.Right, 0); | |
374 | + end; | |
309 | 375 | end; |
310 | 376 | end; |
311 | 377 | function TResPopupBrowser.GetWindowHeight : Integer; |
@@ -1148,7 +1148,10 @@ begin | ||
1148 | 1148 | |
1149 | 1149 | //|bvAbvÊu |
1150 | 1150 | FPopupPosition := TGikoPopupPosition(ini.ReadInteger('Browser', 'PopupPosition', Ord(gppLeftBottom))); |
1151 | - | |
1151 | + // o^56ÈO©çÌAbvf[gÎô | |
1152 | + if (FPopupPosition = gppCenter) then begin | |
1153 | + FPopupPosition := gppTop; | |
1154 | + end; | |
1152 | 1155 | //AhXo[ |
1153 | 1156 | FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False); |
1154 | 1157 | FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True); |