サムネイル表示にバグがあったので訂正
@@ -171,7 +171,6 @@ | ||
171 | 171 | this.previewPictureBox.Dock = DockStyle.Fill; |
172 | 172 | this.listView.Visible = false; |
173 | 173 | this.viewMode = ViewMode.PreviewInPreviewMode; |
174 | - //anotherView.setViewMode(ViewMode.ListInPreviewMode); | |
175 | 174 | this.drawPreview(anotherView.FocusedFilerItem); |
176 | 175 | break; |
177 | 176 | case ViewMode.ThumbnailMode: |
@@ -185,31 +184,6 @@ | ||
185 | 184 | } |
186 | 185 | } |
187 | 186 | |
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 | - | |
213 | 187 | #region プレビュー関係 |
214 | 188 | |
215 | 189 | private IFilerItem previewingItem = null; //現在表示中のアイテム |
@@ -299,8 +273,6 @@ | ||
299 | 273 | int thumbnailHeight = SCFiler2System.Instance.Option.FileView.ThumbnailHeight; |
300 | 274 | |
301 | 275 | this.listView.View = View.LargeIcon; |
302 | - this.listView.LargeImageList = new ImageList(); | |
303 | - | |
304 | 276 | this.listView.LargeImageList.ImageSize = new Size(thumbnailWidth, thumbnailHeight); |
305 | 277 | |
306 | 278 | foreach (VirtualListViewItem item in this.virtualListView.Items) { |
@@ -317,7 +289,7 @@ | ||
317 | 289 | } |
318 | 290 | |
319 | 291 | foreach (VirtualListViewItem item in this.virtualListView.Items) { |
320 | - item.Item.ImageIndex = item.SmallImageIndex; | |
292 | + item.ImageMode = VirtualListViewItem.ImageSize.Icon; | |
321 | 293 | } |
322 | 294 | } |
323 | 295 |
@@ -193,6 +193,7 @@ | ||
193 | 193 | |
194 | 194 | internal void InitializeImageList() { |
195 | 195 | this.targetView.SmallImageList.Images.Clear(); |
196 | + this.targetView.LargeImageList.Images.Clear(); | |
196 | 197 | this.targetView.SmallImageList.Images.Add(Images.Folder); |
197 | 198 | this.targetView.SmallImageList.Images.Add(Images.Hdd); |
198 | 199 | this.targetView.SmallImageList.Images.Add(Images.CDROM); |
@@ -166,17 +166,16 @@ | ||
166 | 166 | } |
167 | 167 | switch (value) { |
168 | 168 | case ImageSize.Icon: |
169 | - if (isSmallImageLoaded) { | |
170 | - this.Item.ImageIndex = smallImageIndex; | |
171 | - return; | |
169 | + if (!isSmallImageLoaded) { | |
170 | + loadSmallImage(); | |
172 | 171 | } |
173 | - loadSmallImage(); | |
172 | + this.Item.ImageIndex = smallImageIndex; | |
174 | 173 | break; |
175 | 174 | case ImageSize.Large: |
176 | - if (isLargeImageLoaded) { | |
177 | - this.Item.ImageIndex = largeImageIndex; | |
175 | + if (!isLargeImageLoaded) { | |
176 | + loadLargeImage(); | |
178 | 177 | } |
179 | - loadLargeImage(); | |
178 | + this.Item.ImageIndex = largeImageIndex; | |
180 | 179 | break; |
181 | 180 | } |
182 | 181 | } |