mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
FEATURE-758: This commit enhances the already made changes to also fix the size of the icons in the destination picker and the context menu. On top of that, if a large icon size is selected we try to get a larger (more defined) icon from the application unfortunately that doesn't improve the build in icons.
This commit is contained in:
parent
1da7d028a0
commit
9df25bdd76
13 changed files with 129 additions and 27 deletions
|
@ -19,6 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Greenshot.IniFile;
|
||||
using GreenshotPlugin.Core;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -30,8 +32,10 @@ namespace Greenshot.Forms {
|
|||
/// the ToolStripMenuSelectList makes it possible to have a single or multi-check menu
|
||||
/// </summary>
|
||||
public class ToolStripMenuSelectList : ToolStripMenuItem {
|
||||
private static CoreConfiguration coreConfiguration = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
private bool multiCheckAllowed = false;
|
||||
private bool updateInProgress = false;
|
||||
private static Image defaultImage = ImageHelper.CreateEmpty(coreConfiguration.IconSize.Width, coreConfiguration.IconSize.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb, Color.Transparent, 96f, 96f);
|
||||
/// <summary>
|
||||
/// Occurs when one of the list's child element's Checked state changes.
|
||||
/// </summary>
|
||||
|
@ -45,6 +49,7 @@ namespace Greenshot.Forms {
|
|||
Identifier = identifier;
|
||||
CheckOnClick = false;
|
||||
multiCheckAllowed = allowMultiCheck;
|
||||
Image = defaultImage;
|
||||
}
|
||||
public ToolStripMenuSelectList() : this(null,false) {}
|
||||
public ToolStripMenuSelectList(Object identifier) : this(identifier,false) {}
|
||||
|
@ -142,6 +147,10 @@ namespace Greenshot.Forms {
|
|||
public void AddItem(string label, Image image, Object data, bool isChecked) {
|
||||
ToolStripMenuSelectListItem newItem = new ToolStripMenuSelectListItem();
|
||||
newItem.Text = label;
|
||||
if (image == null) {
|
||||
image = defaultImage;
|
||||
}
|
||||
newItem.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||
newItem.Image = image;
|
||||
newItem.CheckOnClick = true;
|
||||
newItem.CheckStateChanged += ItemCheckStateChanged;
|
||||
|
@ -243,7 +252,6 @@ namespace Greenshot.Forms {
|
|||
/// Also the Checked property hides the normal checked property so we can render our own check
|
||||
/// </summary>
|
||||
public class ToolStripMenuSelectListItem : ToolStripMenuItem {
|
||||
|
||||
public object Data {
|
||||
get;
|
||||
set;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue