mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-23 09:32:14 +00:00
6b804f03eb
The only bugs are that windows don't show in the center of the screen, and Gecko webbrowsers are not serializing properly to be converted to ShiftUI widgets (you can use the ToWidget() extension method to convert a WinForms control to a ShiftUI widget) Also multiple desktop panels are removed due to some odd bug I can't diagnose. Will add them back in the future. Promise. I loved creating GNOME2 skins.
69 lines
1.5 KiB
C#
69 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Drawing;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using ShiftUI;
|
|
using System.Drawing.Imaging;
|
|
using Newtonsoft.Json;
|
|
using System.IO;
|
|
|
|
namespace ShiftOS
|
|
{
|
|
public partial class IconWidget : UserWidget
|
|
{
|
|
public IconWidget()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void IconWidget_Load(object sender, EventArgs e)
|
|
{
|
|
pblarge.Top = (this.Height - pblarge.Height) / 2;
|
|
}
|
|
|
|
|
|
|
|
public Image LargeImage
|
|
{
|
|
get
|
|
{
|
|
return pblarge.Image;
|
|
}
|
|
set
|
|
{
|
|
pblarge.Image = value;
|
|
}
|
|
}
|
|
|
|
public string IconName
|
|
{
|
|
get
|
|
{
|
|
return lbname.Text;
|
|
|
|
}
|
|
set
|
|
{
|
|
lbname.Text = value;
|
|
}
|
|
}
|
|
|
|
private void pblarge_Click(object sender, EventArgs e)
|
|
{
|
|
API.CreateGraphicPickerSession($"Icon - {IconName}", false);
|
|
API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) =>
|
|
{
|
|
if(API.GraphicPickerSession.IdleImage != null)
|
|
{
|
|
LargeImage = API.GraphicPickerSession.IdleImage;
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
}
|