OSDN Git Service

ヘッダコントロールのHeightがでかすぎる気がしたので修正
authorC.Ponapalt <ponapalt@shillest.net>
Wed, 20 Jul 2005 04:29:25 +0000 (04:29 +0000)
committerC.Ponapalt <ponapalt@shillest.net>
Wed, 20 Jul 2005 04:29:25 +0000 (04:29 +0000)
ListView_Scrollはもう効かないのでWM_VSCROLLをPostするよう変更
常にフォーカスを奪う状態になっていたところを削った
※大改造中?のようなのでコメントアウトにとどめてあります。適宜削除して下さい。

bottleclient/LogForm.dfm
bottleclient/LogForm.pas

index 6ab55c2..31fc60c 100755 (executable)
@@ -54,12 +54,12 @@ object frmLog: TfrmLog
       OnClick = mnSaveLogXMLClick
     end
     object tbtnDownloadLog: TToolButton
-      Left = 80
+      Left = 82
       Top = 0
       Action = frmSender.actDownloadLog
     end
     object ToolButton1: TToolButton
-      Left = 103
+      Left = 105
       Top = 0
       Width = 8
       Caption = 'ToolButton1'
@@ -67,12 +67,12 @@ object frmLog: TfrmLog
       Style = tbsSeparator
     end
     object tbtnInsertCue: TToolButton
-      Left = 111
+      Left = 113
       Top = 0
       Action = frmSender.actInsertCue
     end
     object tbtnFindBottle: TToolButton
-      Left = 134
+      Left = 136
       Top = 0
       Hint = #12508#12488#12523#12434#26908#32034#12377#12427
       Caption = #26908#32034'(&F)'
@@ -80,7 +80,7 @@ object frmLog: TfrmLog
       OnClick = tbtnFindBottleClick
     end
     object tbtnPreviewStyle: TToolButton
-      Left = 157
+      Left = 159
       Top = 0
       Hint = #12525#12464#12503#12524#12499#12517#12540#12398#34920#31034#24418#24335#12434#22793#26356#12375#12414#12377
       Caption = #12503#12524#12499#12517#12540#12473#12479#12452#12523
@@ -90,7 +90,7 @@ object frmLog: TfrmLog
       OnClick = tbtnPreviewStyleClick
     end
     object tbtnListPreviewStyle: TToolButton
-      Left = 191
+      Left = 195
       Top = 0
       Hint = #12522#12473#12488#12398#12473#12463#12522#12503#12488#34920#31034#24418#24335#12434#22793#26356#12375#12414#12377
       Caption = #12473#12463#12522#12503#12488#34920#31034#24418#24335
@@ -100,7 +100,7 @@ object frmLog: TfrmLog
       OnClick = tbtnListPreviewStyleClick
     end
     object ToolButton2: TToolButton
-      Left = 225
+      Left = 231
       Top = 0
       Width = 8
       Caption = 'ToolButton2'
@@ -108,17 +108,17 @@ object frmLog: TfrmLog
       Style = tbsSeparator
     end
     object tbtnVoteMessage: TToolButton
-      Left = 233
+      Left = 239
       Top = 0
       Action = frmSender.actVoteMessage
     end
     object tbtnAgreeMessage: TToolButton
-      Left = 256
+      Left = 262
       Top = 0
       Action = frmSender.actAgreeMessage
     end
     object tbtnSendEditor: TToolButton
-      Left = 279
+      Left = 285
       Top = 0
       Action = frmSender.actSendToEditor
     end
@@ -127,13 +127,13 @@ object frmLog: TfrmLog
     Left = 0
     Top = 22
     Width = 599
-    Height = 287
+    Height = 294
     Align = alClient
     BevelOuter = bvNone
     TabOrder = 1
     object StatusBar: TStatusBar
       Left = 0
-      Top = 268
+      Top = 275
       Width = 599
       Height = 19
       Panels = <
@@ -143,18 +143,19 @@ object frmLog: TfrmLog
         item
           Width = 50
         end>
+      SimplePanel = False
     end
     object pnlPanel: TPanel
       Left = 0
       Top = 0
       Width = 599
-      Height = 268
+      Height = 275
       Align = alClient
       BevelOuter = bvNone
       TabOrder = 1
       object Splitter: TSplitter
         Left = 0
-        Top = 156
+        Top = 163
         Width = 599
         Height = 3
         Cursor = crVSplit
@@ -165,7 +166,7 @@ object frmLog: TfrmLog
         Left = 0
         Top = 0
         Width = 599
-        Height = 156
+        Height = 163
         Align = alClient
         TabOrder = 0
         object tabBottleLog: TTabControl
@@ -188,7 +189,8 @@ object frmLog: TfrmLog
           Left = 1
           Top = 27
           Width = 597
-          Height = 22
+          Height = 16
+          DragReorder = False
           Sections = <
             item
               Alignment = taRightJustify
@@ -228,9 +230,9 @@ object frmLog: TfrmLog
         end
         object lvwLog: TListBox
           Left = 1
-          Top = 49
+          Top = 43
           Width = 597
-          Height = 106
+          Height = 119
           Style = lbVirtualOwnerDraw
           Align = alClient
           ItemHeight = 16
@@ -250,7 +252,7 @@ object frmLog: TfrmLog
       end
       object pnlPreviewArea: TPanel
         Left = 0
-        Top = 159
+        Top = 166
         Width = 599
         Height = 109
         Align = alBottom
index 4030f7c..b298fd0 100755 (executable)
@@ -236,10 +236,11 @@ begin
   UpdateWindow;
   if Sel >= 0 then begin
     lvwLog.ItemIndex := Sel + 1;
-    lvwLog.SetFocus;
+    //lvwLog.SetFocus;
   end;
   if not lvwLog.Focused then
-    ListView_Scroll(lvwLog.Handle, 0, High(integer));
+    PostMessage(lvwLog.Handle,WM_VSCROLL,SB_TOP,0);
+    //ListView_Scroll(lvwLog.Handle, 0, High(integer));
   //lvwLog.OnChange := lvwLogChange;
 end;
 
@@ -257,10 +258,11 @@ begin
   UpdateWindow;
   if Sel >= 0 then begin
     lvwLog.ItemIndex := Sel + 1;
-    lvwLog.SetFocus;
+    //lvwLog.SetFocus;
   end;
   if not lvwLog.Focused then
-    ListView_Scroll(lvwLog.Handle, 0, High(integer));
+    PostMessage(lvwLog.Handle,WM_VSCROLL,SB_TOP,0);
+    //ListView_Scroll(lvwLog.Handle, 0, High(integer));
   //lvwLog.OnChange := lvwLogChange;
 end;
 
@@ -1755,8 +1757,16 @@ begin
   // \83S\81[\83X\83g
   DrawListSection(SubGhost, DestRect.Top, Bottle.Ghost);
   // \93\8a\95[\81E\93¯\88Ó
-  DrawListSection(SubVotes, DestRect.Top, IntToStr(Bottle.Votes));
-  DrawListSection(SubAgrees, DestRect.Top, IntToStr(Bottle.Agrees));
+  if Bottle.Votes <> 0 then
+    DrawListSection(SubVotes, DestRect.Top, IntToStr(Bottle.Votes))
+  else
+    DrawListSection(SubVotes, DestRect.Top, '');
+
+  if Bottle.Agrees <> 0 then
+    DrawListSection(SubAgrees, DestRect.Top, IntToStr(Bottle.Agrees))
+  else
+    DrawListSection(SubVotes, DestRect.Top, '');
+  
   // \83X\83N\83\8a\83v\83g
   DestRect.Left := Header.Sections[SubScript].Left;
   DrawSingleLineScript(Bottle, DestRect, State);