Skip to content

Commit c8911d1

Browse files
committed
Merge pull request #646 from JoeRobich/Fix-Image-Scaling-Issues2
Fix DockPanel and Marker image scaling issues 2
2 parents 1d7e7bb + f6f7ee4 commit c8911d1

File tree

18 files changed

+824
-35
lines changed

18 files changed

+824
-35
lines changed

External/Plugins/FlashDebugger/FlashDebugger.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@
172172
</EmbeddedResource>
173173
</ItemGroup>
174174
<ItemGroup>
175-
<None Include="Icons\Breakpoints\CurLine.bmp" />
176-
<None Include="Icons\Breakpoints\Disabled.bmp" />
177-
<None Include="Icons\Breakpoints\Enabled.bmp" />
178175
<Content Include="fbd.j4n.jar">
179176
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
180177
</Content>
178+
<Content Include="Icons\Breakpoints\CurLine.png" />
179+
<Content Include="Icons\Breakpoints\Disabled.png" />
180+
<Content Include="Icons\Breakpoints\Enabled.png" />
181181
<Content Include="Icons\Continue.png" />
182182
<Content Include="Icons\Current.png" />
183183
<None Include="Icons\DeleteBreakpoints.png" />

External/Plugins/FlashDebugger/Helpers/ScintillaHelper.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using ScintillaNet.Configuration;
88
using PluginCore.Managers;
99
using PluginCore.Helpers;
10+
using System.Drawing;
1011

1112
namespace FlashDebugger
1213
{
@@ -46,9 +47,12 @@ static public void InitMarkers(ScintillaControl sci)
4647
mask |= GetMarkerMask(markerBPNotAvailable);
4748
mask |= GetMarkerMask(markerCurrentLine);
4849
sci.SetMarginMaskN(0, mask);
49-
sci.MarkerDefinePixmap(markerBPEnabled, ScintillaNet.XPM.ConvertToXPM(Properties.Resource.Enabled, "#00FF00"));
50-
sci.MarkerDefinePixmap(markerBPDisabled, ScintillaNet.XPM.ConvertToXPM(Properties.Resource.Disabled, "#00FF00"));
51-
sci.MarkerDefinePixmap(markerCurrentLine, ScintillaNet.XPM.ConvertToXPM(Properties.Resource.CurLine, "#00FF00"));
50+
var enabledImage = ScaleHelper.Scale(Properties.Resource.Enabled);
51+
var disabledImage = ScaleHelper.Scale(Properties.Resource.Disabled);
52+
var curlineImage = ScaleHelper.Scale(Properties.Resource.CurLine);
53+
sci.MarkerDefinePixmap(markerBPEnabled, ScintillaNet.XPM.ConvertToXPM(enabledImage, "#00FF00"));
54+
sci.MarkerDefinePixmap(markerBPDisabled, ScintillaNet.XPM.ConvertToXPM(disabledImage, "#00FF00"));
55+
sci.MarkerDefinePixmap(markerCurrentLine, ScintillaNet.XPM.ConvertToXPM(curlineImage, "#00FF00"));
5256
Language lang = PluginBase.MainForm.SciConfig.GetLanguage("as3"); // default
5357
sci.MarkerSetBack(markerBPEnabled, lang.editorstyle.ErrorLineBack); // enable
5458
sci.MarkerSetBack(markerBPDisabled, lang.editorstyle.DisabledLineBack); // disable
Binary file not shown.
275 Bytes
Loading
Binary file not shown.
324 Bytes
Loading
Binary file not shown.
276 Bytes
Loading

External/Plugins/FlashDebugger/Properties/Resource.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

External/Plugins/FlashDebugger/Properties/Resource.resx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,16 @@
119119
</resheader>
120120
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
121121
<data name="CurLine" type="System.Resources.ResXFileRef, System.Windows.Forms">
122-
<value>..\Icons\Breakpoints\CurLine.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
122+
<value>..\Icons\Breakpoints\CurLine.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123123
</data>
124124
<data name="Current" type="System.Resources.ResXFileRef, System.Windows.Forms">
125125
<value>..\Icons\Current.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126126
</data>
127127
<data name="Disabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
128-
<value>..\Icons\Breakpoints\Disabled.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
128+
<value>..\Icons\Breakpoints\Disabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129129
</data>
130130
<data name="Enabled" type="System.Resources.ResXFileRef, System.Windows.Forms">
131-
<value>..\Icons\Breakpoints\Enabled.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
131+
<value>..\Icons\Breakpoints\Enabled.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132132
</data>
133133
<data name="Finish" type="System.Resources.ResXFileRef, System.Windows.Forms">
134134
<value>..\Icons\Finish.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>

0 commit comments

Comments
 (0)