• R/O
  • SSH
  • HTTPS

scfiler: コミット


コミットメタ情報

リビジョン98 (tree)
日時2009-06-07 02:03:50
作者yuki_sc

ログメッセージ

サムネイル表示にバグがあったので訂正

変更サマリ

差分

--- SCFiler2/FileView.cs (revision 97)
+++ SCFiler2/FileView.cs (revision 98)
@@ -171,7 +171,6 @@
171171 this.previewPictureBox.Dock = DockStyle.Fill;
172172 this.listView.Visible = false;
173173 this.viewMode = ViewMode.PreviewInPreviewMode;
174- //anotherView.setViewMode(ViewMode.ListInPreviewMode);
175174 this.drawPreview(anotherView.FocusedFilerItem);
176175 break;
177176 case ViewMode.ThumbnailMode:
@@ -185,31 +184,6 @@
185184 }
186185 }
187186
188- //private Image getSizeTransformedImage(Image source, int width, int height, bool IsDoNothingWhenSmall) {
189- // //サイズを合わせる
190- // if (IsDoNothingWhenSmall && source.Width < width && source.Height < height) {
191- // return source;
192- // } else {
193- // Image output = new Bitmap(width, height);
194- // //うまく収まるサイズの計算
195- // float rateX = (float)width / (float)source.Width;
196- // float rateY = (float)height / (float)source.Height;
197- // int newWidth, newHeight;
198- // if (rateX < rateY) { //より小さくなる方にあわせないといけない
199- // newWidth = (int)(source.Width * rateX);
200- // newHeight = (int)(source.Height * rateX);
201- // } else {
202- // newWidth = (int)(source.Width * rateY);
203- // newHeight = (int)(source.Height * rateY);
204- // }
205- // Graphics g = Graphics.FromImage(output);
206- // g.FillRectangle(new SolidBrush(Color.White), 0, 0, width, height);
207- // g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bilinear;
208- // g.DrawImage(source, 0, 0, newWidth, newHeight);
209- // return output;
210- // }
211- //}
212-
213187 #region プレビュー関係
214188
215189 private IFilerItem previewingItem = null; //現在表示中のアイテム
@@ -299,8 +273,6 @@
299273 int thumbnailHeight = SCFiler2System.Instance.Option.FileView.ThumbnailHeight;
300274
301275 this.listView.View = View.LargeIcon;
302- this.listView.LargeImageList = new ImageList();
303-
304276 this.listView.LargeImageList.ImageSize = new Size(thumbnailWidth, thumbnailHeight);
305277
306278 foreach (VirtualListViewItem item in this.virtualListView.Items) {
@@ -317,7 +289,7 @@
317289 }
318290
319291 foreach (VirtualListViewItem item in this.virtualListView.Items) {
320- item.Item.ImageIndex = item.SmallImageIndex;
292+ item.ImageMode = VirtualListViewItem.ImageSize.Icon;
321293 }
322294 }
323295
--- SCFiler2/VirtualListView.cs (revision 97)
+++ SCFiler2/VirtualListView.cs (revision 98)
@@ -193,6 +193,7 @@
193193
194194 internal void InitializeImageList() {
195195 this.targetView.SmallImageList.Images.Clear();
196+ this.targetView.LargeImageList.Images.Clear();
196197 this.targetView.SmallImageList.Images.Add(Images.Folder);
197198 this.targetView.SmallImageList.Images.Add(Images.Hdd);
198199 this.targetView.SmallImageList.Images.Add(Images.CDROM);
--- SCFiler2/VirtualListViewItem.cs (revision 97)
+++ SCFiler2/VirtualListViewItem.cs (revision 98)
@@ -166,17 +166,16 @@
166166 }
167167 switch (value) {
168168 case ImageSize.Icon:
169- if (isSmallImageLoaded) {
170- this.Item.ImageIndex = smallImageIndex;
171- return;
169+ if (!isSmallImageLoaded) {
170+ loadSmallImage();
172171 }
173- loadSmallImage();
172+ this.Item.ImageIndex = smallImageIndex;
174173 break;
175174 case ImageSize.Large:
176- if (isLargeImageLoaded) {
177- this.Item.ImageIndex = largeImageIndex;
175+ if (!isLargeImageLoaded) {
176+ loadLargeImage();
178177 }
179- loadLargeImage();
178+ this.Item.ImageIndex = largeImageIndex;
180179 break;
181180 }
182181 }
旧リポジトリブラウザで表示