mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-09-14 19:32:10 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
1bf9e7fb56 | |||
ca69554f37 | |||
cf7029037e | |||
418388b0ab | |||
a0f8689d4f | |||
95007bdd26 | |||
ab91540deb | |||
b2ebb984f8 | |||
f7e9ad74d1 | |||
d48da3d51c | |||
76d22554c5 |
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,4 +1,3 @@
|
|||||||
# These are supported funding model platforms
|
github: chylex
|
||||||
|
|
||||||
patreon: chylex
|
patreon: chylex
|
||||||
ko_fi: chylex
|
ko_fi: chylex
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetDuck.Controls;
|
using TweetDuck.Controls;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
|
|
||||||
namespace TweetDuck.Browser.Bridge{
|
namespace TweetDuck.Browser.Bridge{
|
||||||
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
[SuppressMessage("ReSharper", "UnusedMember.Global")]
|
||||||
|
@@ -20,7 +20,7 @@ using TweetDuck.Updates;
|
|||||||
using TweetDuck.Utils;
|
using TweetDuck.Utils;
|
||||||
using TweetLib.Core.Features.Plugins;
|
using TweetLib.Core.Features.Plugins;
|
||||||
using TweetLib.Core.Features.Plugins.Events;
|
using TweetLib.Core.Features.Plugins.Events;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
|
|
||||||
namespace TweetDuck.Browser{
|
namespace TweetDuck.Browser{
|
||||||
sealed partial class FormBrowser : Form, AnalyticsFile.IProvider{
|
sealed partial class FormBrowser : Form, AnalyticsFile.IProvider{
|
||||||
@@ -48,10 +48,13 @@ namespace TweetDuck.Browser{
|
|||||||
|
|
||||||
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
public AnalyticsFile AnalyticsFile => analytics?.File ?? AnalyticsFile.Dummy;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
private readonly TweetDeckBrowser browser;
|
private readonly TweetDeckBrowser browser;
|
||||||
|
private readonly FormNotificationTweet notification;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private readonly PluginManager plugins;
|
private readonly PluginManager plugins;
|
||||||
private readonly UpdateHandler updates;
|
private readonly UpdateHandler updates;
|
||||||
private readonly FormNotificationTweet notification;
|
|
||||||
private readonly ContextMenu contextMenu;
|
private readonly ContextMenu contextMenu;
|
||||||
private readonly UpdateBridge updateBridge;
|
private readonly UpdateBridge updateBridge;
|
||||||
|
|
||||||
@@ -90,6 +93,7 @@ namespace TweetDuck.Browser{
|
|||||||
Disposed += (sender, args) => {
|
Disposed += (sender, args) => {
|
||||||
Config.MuteToggled -= Config_MuteToggled;
|
Config.MuteToggled -= Config_MuteToggled;
|
||||||
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
|
Config.TrayBehaviorChanged -= Config_TrayBehaviorChanged;
|
||||||
|
browser.Dispose();
|
||||||
};
|
};
|
||||||
|
|
||||||
Config.MuteToggled += Config_MuteToggled;
|
Config.MuteToggled += Config_MuteToggled;
|
||||||
@@ -115,9 +119,7 @@ namespace TweetDuck.Browser{
|
|||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
|
|
||||||
browser.Dispose();
|
|
||||||
updates.Dispose();
|
updates.Dispose();
|
||||||
notification.Dispose();
|
|
||||||
contextMenu.Dispose();
|
contextMenu.Dispose();
|
||||||
|
|
||||||
notificationScreenshotManager?.Dispose();
|
notificationScreenshotManager?.Dispose();
|
||||||
|
@@ -103,7 +103,10 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
protected double SizeScale => DpiScale * Config.ZoomLevel / 100.0;
|
protected double SizeScale => DpiScale * Config.ZoomLevel / 100.0;
|
||||||
|
|
||||||
protected readonly FormBrowser owner;
|
protected readonly FormBrowser owner;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
protected readonly ChromiumWebBrowser browser;
|
protected readonly ChromiumWebBrowser browser;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
private readonly ResourceHandlerNotification resourceHandler = new ResourceHandlerNotification();
|
||||||
|
|
||||||
@@ -144,7 +147,11 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
this.browser.SetupZoomEvents();
|
this.browser.SetupZoomEvents();
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
Disposed += (sender, args) => this.owner.FormClosed -= owner_FormClosed;
|
|
||||||
|
Disposed += (sender, args) => {
|
||||||
|
this.owner.FormClosed -= owner_FormClosed;
|
||||||
|
this.browser.Dispose();
|
||||||
|
};
|
||||||
|
|
||||||
DpiScale = this.GetDPIScale();
|
DpiScale = this.GetDPIScale();
|
||||||
|
|
||||||
@@ -155,7 +162,6 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
protected override void Dispose(bool disposing){
|
protected override void Dispose(bool disposing){
|
||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
browser.Dispose();
|
|
||||||
resourceHandler.Dispose();
|
resourceHandler.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,6 +25,8 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
private IntPtr mouseHook;
|
private IntPtr mouseHook;
|
||||||
private bool blockXButtonUp;
|
private bool blockXButtonUp;
|
||||||
|
|
||||||
|
private int currentOpacity;
|
||||||
|
|
||||||
private bool? prevDisplayTimer;
|
private bool? prevDisplayTimer;
|
||||||
private int? prevFontSize;
|
private int? prevFontSize;
|
||||||
|
|
||||||
@@ -81,6 +83,15 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
Disposed += (sender, args) => StopMouseHook(true);
|
Disposed += (sender, args) => StopMouseHook(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// helpers
|
||||||
|
|
||||||
|
private void SetOpacity(int opacity){
|
||||||
|
if (currentOpacity != opacity){
|
||||||
|
currentOpacity = opacity;
|
||||||
|
Opacity = opacity / 100.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// mouse wheel hook
|
// mouse wheel hook
|
||||||
|
|
||||||
private void StartMouseHook(){
|
private void StartMouseHook(){
|
||||||
@@ -170,9 +181,11 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
|
|
||||||
if (isCursorInside){
|
if (isCursorInside){
|
||||||
StartMouseHook();
|
StartMouseHook();
|
||||||
|
SetOpacity(100);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
StopMouseHook(false);
|
StopMouseHook(false);
|
||||||
|
SetOpacity(Config.NotificationWindowOpacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCursorInside || FreezeTimer || ContextMenuOpen){
|
if (isCursorInside || FreezeTimer || ContextMenuOpen){
|
||||||
@@ -265,6 +278,7 @@ namespace TweetDuck.Browser.Notification{
|
|||||||
SetNotificationSize(BaseClientWidth, BaseClientHeight);
|
SetNotificationSize(BaseClientWidth, BaseClientHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetOpacity(IsCursorOverBrowser ? 100 : Config.NotificationWindowOpacity);
|
||||||
MoveToVisibleLocation();
|
MoveToVisibleLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using TweetDuck.Browser.Data;
|
using TweetDuck.Browser.Data;
|
||||||
using TweetLib.Core.Features.Configuration;
|
|
||||||
using TweetLib.Core.Features.Plugins.Config;
|
using TweetLib.Core.Features.Plugins.Config;
|
||||||
using TweetLib.Core.Serialization.Converters;
|
using TweetLib.Core.Serialization.Converters;
|
||||||
|
using TweetLib.Core.Systems.Configuration;
|
||||||
using TweetLib.Core.Utils;
|
using TweetLib.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDuck.Configuration{
|
namespace TweetDuck.Configuration{
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using TweetLib.Core.Features.Configuration;
|
|
||||||
using TweetLib.Core.Features.Plugins;
|
using TweetLib.Core.Features.Plugins;
|
||||||
using TweetLib.Core.Features.Plugins.Config;
|
using TweetLib.Core.Features.Plugins.Config;
|
||||||
using TweetLib.Core.Features.Plugins.Events;
|
using TweetLib.Core.Features.Plugins.Events;
|
||||||
|
using TweetLib.Core.Systems.Configuration;
|
||||||
|
|
||||||
namespace TweetDuck.Configuration{
|
namespace TweetDuck.Configuration{
|
||||||
sealed class PluginConfig : BaseConfig, IPluginConfig{
|
sealed class PluginConfig : BaseConfig, IPluginConfig{
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using TweetLib.Core.Features.Configuration;
|
using TweetLib.Core.Systems.Configuration;
|
||||||
|
|
||||||
namespace TweetDuck.Configuration{
|
namespace TweetDuck.Configuration{
|
||||||
sealed class SystemConfig : BaseConfig{
|
sealed class SystemConfig : BaseConfig{
|
||||||
|
@@ -3,9 +3,9 @@ using System.Drawing;
|
|||||||
using TweetDuck.Browser;
|
using TweetDuck.Browser;
|
||||||
using TweetDuck.Browser.Data;
|
using TweetDuck.Browser.Data;
|
||||||
using TweetDuck.Controls;
|
using TweetDuck.Controls;
|
||||||
using TweetLib.Core.Features.Configuration;
|
|
||||||
using TweetLib.Core.Features.Notifications;
|
using TweetLib.Core.Features.Notifications;
|
||||||
using TweetLib.Core.Features.Twitter;
|
using TweetLib.Core.Features.Twitter;
|
||||||
|
using TweetLib.Core.Systems.Configuration;
|
||||||
|
|
||||||
namespace TweetDuck.Configuration{
|
namespace TweetDuck.Configuration{
|
||||||
sealed class UserConfig : BaseConfig{
|
sealed class UserConfig : BaseConfig{
|
||||||
@@ -65,6 +65,7 @@ namespace TweetDuck.Configuration{
|
|||||||
public Point CustomNotificationPosition { get; set; } = ControlExtensions.InvisibleLocation;
|
public Point CustomNotificationPosition { get; set; } = ControlExtensions.InvisibleLocation;
|
||||||
public int NotificationDisplay { get; set; } = 0;
|
public int NotificationDisplay { get; set; } = 0;
|
||||||
public int NotificationEdgeDistance { get; set; } = 8;
|
public int NotificationEdgeDistance { get; set; } = 8;
|
||||||
|
public int NotificationWindowOpacity { get; set; } = 100;
|
||||||
|
|
||||||
public DesktopNotification.Size NotificationSize { get; set; } = DesktopNotification.Size.Auto;
|
public DesktopNotification.Size NotificationSize { get; set; } = DesktopNotification.Size.Auto;
|
||||||
public Size CustomNotificationSize { get; set; } = Size.Empty;
|
public Size CustomNotificationSize { get; set; } = Size.Empty;
|
||||||
|
@@ -56,7 +56,10 @@ namespace TweetDuck.Dialogs{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning disable IDE0069 // Disposable fields should be disposed
|
||||||
private readonly ChromiumWebBrowser browser;
|
private readonly ChromiumWebBrowser browser;
|
||||||
|
#pragma warning restore IDE0069 // Disposable fields should be disposed
|
||||||
|
|
||||||
private string nextUrl;
|
private string nextUrl;
|
||||||
|
|
||||||
private FormGuide(string url, FormBrowser owner){
|
private FormGuide(string url, FormBrowser owner){
|
||||||
@@ -87,12 +90,12 @@ namespace TweetDuck.Dialogs{
|
|||||||
browser.SetupZoomEvents();
|
browser.SetupZoomEvents();
|
||||||
|
|
||||||
Controls.Add(browser);
|
Controls.Add(browser);
|
||||||
|
Disposed += (sender, args) => browser.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing){
|
protected override void Dispose(bool disposing){
|
||||||
if (disposing){
|
if (disposing){
|
||||||
components?.Dispose();
|
components?.Dispose();
|
||||||
browser.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
@@ -12,7 +12,7 @@ using TweetDuck.Management;
|
|||||||
using TweetDuck.Management.Analytics;
|
using TweetDuck.Management.Analytics;
|
||||||
using TweetDuck.Utils;
|
using TweetDuck.Utils;
|
||||||
using TweetLib.Core.Features.Plugins;
|
using TweetLib.Core.Features.Plugins;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
|
|
||||||
namespace TweetDuck.Dialogs{
|
namespace TweetDuck.Dialogs{
|
||||||
sealed partial class FormSettings : Form, FormManager.IAppDialog{
|
sealed partial class FormSettings : Form, FormManager.IAppDialog{
|
||||||
|
4
Dialogs/Settings/TabSettingsGeneral.Designer.cs
generated
4
Dialogs/Settings/TabSettingsGeneral.Designer.cs
generated
@@ -115,7 +115,7 @@
|
|||||||
//
|
//
|
||||||
this.labelZoomValue.BackColor = System.Drawing.Color.Transparent;
|
this.labelZoomValue.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.labelZoomValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelZoomValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelZoomValue.Location = new System.Drawing.Point(147, 4);
|
this.labelZoomValue.Location = new System.Drawing.Point(176, 4);
|
||||||
this.labelZoomValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelZoomValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelZoomValue.Name = "labelZoomValue";
|
this.labelZoomValue.Name = "labelZoomValue";
|
||||||
this.labelZoomValue.Size = new System.Drawing.Size(38, 13);
|
this.labelZoomValue.Size = new System.Drawing.Size(38, 13);
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
this.trackBarZoom.Maximum = 200;
|
this.trackBarZoom.Maximum = 200;
|
||||||
this.trackBarZoom.Minimum = 50;
|
this.trackBarZoom.Minimum = 50;
|
||||||
this.trackBarZoom.Name = "trackBarZoom";
|
this.trackBarZoom.Name = "trackBarZoom";
|
||||||
this.trackBarZoom.Size = new System.Drawing.Size(148, 30);
|
this.trackBarZoom.Size = new System.Drawing.Size(177, 30);
|
||||||
this.trackBarZoom.SmallChange = 5;
|
this.trackBarZoom.SmallChange = 5;
|
||||||
this.trackBarZoom.TabIndex = 0;
|
this.trackBarZoom.TabIndex = 0;
|
||||||
this.trackBarZoom.TickFrequency = 25;
|
this.trackBarZoom.TickFrequency = 25;
|
||||||
|
@@ -5,7 +5,7 @@ using System.Windows.Forms;
|
|||||||
using TweetDuck.Browser.Handling.General;
|
using TweetDuck.Browser.Handling.General;
|
||||||
using TweetDuck.Controls;
|
using TweetDuck.Controls;
|
||||||
using TweetDuck.Utils;
|
using TweetDuck.Utils;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
using TweetLib.Core.Utils;
|
using TweetLib.Core.Utils;
|
||||||
|
|
||||||
namespace TweetDuck.Dialogs.Settings{
|
namespace TweetDuck.Dialogs.Settings{
|
||||||
|
@@ -65,6 +65,10 @@
|
|||||||
this.panelSize = new System.Windows.Forms.Panel();
|
this.panelSize = new System.Windows.Forms.Panel();
|
||||||
this.durationUpdateTimer = new System.Windows.Forms.Timer(this.components);
|
this.durationUpdateTimer = new System.Windows.Forms.Timer(this.components);
|
||||||
this.flowPanelLeft = new System.Windows.Forms.FlowLayoutPanel();
|
this.flowPanelLeft = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
|
this.labelOpacity = new System.Windows.Forms.Label();
|
||||||
|
this.panelOpacity = new System.Windows.Forms.Panel();
|
||||||
|
this.labelOpacityValue = new System.Windows.Forms.Label();
|
||||||
|
this.trackBarOpacity = new System.Windows.Forms.TrackBar();
|
||||||
this.panelScrollSpeed = new System.Windows.Forms.Panel();
|
this.panelScrollSpeed = new System.Windows.Forms.Panel();
|
||||||
this.flowPanelRight = new System.Windows.Forms.FlowLayoutPanel();
|
this.flowPanelRight = new System.Windows.Forms.FlowLayoutPanel();
|
||||||
this.panelSeparator = new System.Windows.Forms.Panel();
|
this.panelSeparator = new System.Windows.Forms.Panel();
|
||||||
@@ -77,6 +81,8 @@
|
|||||||
this.panelTimer.SuspendLayout();
|
this.panelTimer.SuspendLayout();
|
||||||
this.panelSize.SuspendLayout();
|
this.panelSize.SuspendLayout();
|
||||||
this.flowPanelLeft.SuspendLayout();
|
this.flowPanelLeft.SuspendLayout();
|
||||||
|
this.panelOpacity.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.trackBarOpacity)).BeginInit();
|
||||||
this.panelScrollSpeed.SuspendLayout();
|
this.panelScrollSpeed.SuspendLayout();
|
||||||
this.flowPanelRight.SuspendLayout();
|
this.flowPanelRight.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -84,7 +90,7 @@
|
|||||||
// labelEdgeDistanceValue
|
// labelEdgeDistanceValue
|
||||||
//
|
//
|
||||||
this.labelEdgeDistanceValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelEdgeDistanceValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelEdgeDistanceValue.Location = new System.Drawing.Point(145, 4);
|
this.labelEdgeDistanceValue.Location = new System.Drawing.Point(175, 4);
|
||||||
this.labelEdgeDistanceValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelEdgeDistanceValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelEdgeDistanceValue.Name = "labelEdgeDistanceValue";
|
this.labelEdgeDistanceValue.Name = "labelEdgeDistanceValue";
|
||||||
this.labelEdgeDistanceValue.Size = new System.Drawing.Size(40, 15);
|
this.labelEdgeDistanceValue.Size = new System.Drawing.Size(40, 15);
|
||||||
@@ -193,7 +199,7 @@
|
|||||||
this.trackBarEdgeDistance.Maximum = 40;
|
this.trackBarEdgeDistance.Maximum = 40;
|
||||||
this.trackBarEdgeDistance.Minimum = 8;
|
this.trackBarEdgeDistance.Minimum = 8;
|
||||||
this.trackBarEdgeDistance.Name = "trackBarEdgeDistance";
|
this.trackBarEdgeDistance.Name = "trackBarEdgeDistance";
|
||||||
this.trackBarEdgeDistance.Size = new System.Drawing.Size(148, 30);
|
this.trackBarEdgeDistance.Size = new System.Drawing.Size(177, 30);
|
||||||
this.trackBarEdgeDistance.SmallChange = 2;
|
this.trackBarEdgeDistance.SmallChange = 2;
|
||||||
this.trackBarEdgeDistance.TabIndex = 0;
|
this.trackBarEdgeDistance.TabIndex = 0;
|
||||||
this.trackBarEdgeDistance.TickFrequency = 4;
|
this.trackBarEdgeDistance.TickFrequency = 4;
|
||||||
@@ -208,12 +214,12 @@
|
|||||||
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationMedium, 0, 0);
|
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationMedium, 0, 0);
|
||||||
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationLong, 1, 0);
|
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationLong, 1, 0);
|
||||||
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationShort, 0, 0);
|
this.tableLayoutDurationButtons.Controls.Add(this.btnDurationShort, 0, 0);
|
||||||
this.tableLayoutDurationButtons.Location = new System.Drawing.Point(3, 353);
|
this.tableLayoutDurationButtons.Location = new System.Drawing.Point(3, 401);
|
||||||
this.tableLayoutDurationButtons.Name = "tableLayoutDurationButtons";
|
this.tableLayoutDurationButtons.Name = "tableLayoutDurationButtons";
|
||||||
this.tableLayoutDurationButtons.RowCount = 1;
|
this.tableLayoutDurationButtons.RowCount = 1;
|
||||||
this.tableLayoutDurationButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
this.tableLayoutDurationButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
this.tableLayoutDurationButtons.Size = new System.Drawing.Size(180, 27);
|
this.tableLayoutDurationButtons.Size = new System.Drawing.Size(180, 27);
|
||||||
this.tableLayoutDurationButtons.TabIndex = 12;
|
this.tableLayoutDurationButtons.TabIndex = 14;
|
||||||
//
|
//
|
||||||
// btnDurationMedium
|
// btnDurationMedium
|
||||||
//
|
//
|
||||||
@@ -267,7 +273,7 @@
|
|||||||
//
|
//
|
||||||
this.labelDurationValue.BackColor = System.Drawing.Color.Transparent;
|
this.labelDurationValue.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.labelDurationValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelDurationValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelDurationValue.Location = new System.Drawing.Point(147, 4);
|
this.labelDurationValue.Location = new System.Drawing.Point(177, 4);
|
||||||
this.labelDurationValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelDurationValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelDurationValue.Name = "labelDurationValue";
|
this.labelDurationValue.Name = "labelDurationValue";
|
||||||
this.labelDurationValue.Size = new System.Drawing.Size(52, 15);
|
this.labelDurationValue.Size = new System.Drawing.Size(52, 15);
|
||||||
@@ -282,7 +288,7 @@
|
|||||||
this.trackBarDuration.Maximum = 60;
|
this.trackBarDuration.Maximum = 60;
|
||||||
this.trackBarDuration.Minimum = 10;
|
this.trackBarDuration.Minimum = 10;
|
||||||
this.trackBarDuration.Name = "trackBarDuration";
|
this.trackBarDuration.Name = "trackBarDuration";
|
||||||
this.trackBarDuration.Size = new System.Drawing.Size(148, 30);
|
this.trackBarDuration.Size = new System.Drawing.Size(177, 30);
|
||||||
this.trackBarDuration.TabIndex = 0;
|
this.trackBarDuration.TabIndex = 0;
|
||||||
this.trackBarDuration.TickFrequency = 5;
|
this.trackBarDuration.TickFrequency = 5;
|
||||||
this.trackBarDuration.Value = 25;
|
this.trackBarDuration.Value = 25;
|
||||||
@@ -349,11 +355,11 @@
|
|||||||
//
|
//
|
||||||
this.checkTimerCountDown.AutoSize = true;
|
this.checkTimerCountDown.AutoSize = true;
|
||||||
this.checkTimerCountDown.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.checkTimerCountDown.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.checkTimerCountDown.Location = new System.Drawing.Point(6, 266);
|
this.checkTimerCountDown.Location = new System.Drawing.Point(6, 314);
|
||||||
this.checkTimerCountDown.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
|
this.checkTimerCountDown.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
|
||||||
this.checkTimerCountDown.Name = "checkTimerCountDown";
|
this.checkTimerCountDown.Name = "checkTimerCountDown";
|
||||||
this.checkTimerCountDown.Size = new System.Drawing.Size(132, 19);
|
this.checkTimerCountDown.Size = new System.Drawing.Size(132, 19);
|
||||||
this.checkTimerCountDown.TabIndex = 9;
|
this.checkTimerCountDown.TabIndex = 11;
|
||||||
this.checkTimerCountDown.Text = "Timer Counts Down";
|
this.checkTimerCountDown.Text = "Timer Counts Down";
|
||||||
this.checkTimerCountDown.UseVisualStyleBackColor = true;
|
this.checkTimerCountDown.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
@@ -361,11 +367,11 @@
|
|||||||
//
|
//
|
||||||
this.checkNotificationTimer.AutoSize = true;
|
this.checkNotificationTimer.AutoSize = true;
|
||||||
this.checkNotificationTimer.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.checkNotificationTimer.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.checkNotificationTimer.Location = new System.Drawing.Point(6, 242);
|
this.checkNotificationTimer.Location = new System.Drawing.Point(6, 290);
|
||||||
this.checkNotificationTimer.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
|
this.checkNotificationTimer.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
|
||||||
this.checkNotificationTimer.Name = "checkNotificationTimer";
|
this.checkNotificationTimer.Name = "checkNotificationTimer";
|
||||||
this.checkNotificationTimer.Size = new System.Drawing.Size(164, 19);
|
this.checkNotificationTimer.Size = new System.Drawing.Size(164, 19);
|
||||||
this.checkNotificationTimer.TabIndex = 8;
|
this.checkNotificationTimer.TabIndex = 10;
|
||||||
this.checkNotificationTimer.Text = "Display Notification Timer";
|
this.checkNotificationTimer.Text = "Display Notification Timer";
|
||||||
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
this.checkNotificationTimer.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
@@ -429,7 +435,7 @@
|
|||||||
// labelScrollSpeedValue
|
// labelScrollSpeedValue
|
||||||
//
|
//
|
||||||
this.labelScrollSpeedValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelScrollSpeedValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelScrollSpeedValue.Location = new System.Drawing.Point(145, 4);
|
this.labelScrollSpeedValue.Location = new System.Drawing.Point(176, 4);
|
||||||
this.labelScrollSpeedValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelScrollSpeedValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelScrollSpeedValue.Name = "labelScrollSpeedValue";
|
this.labelScrollSpeedValue.Name = "labelScrollSpeedValue";
|
||||||
this.labelScrollSpeedValue.Size = new System.Drawing.Size(38, 15);
|
this.labelScrollSpeedValue.Size = new System.Drawing.Size(38, 15);
|
||||||
@@ -445,7 +451,7 @@
|
|||||||
this.trackBarScrollSpeed.Maximum = 200;
|
this.trackBarScrollSpeed.Maximum = 200;
|
||||||
this.trackBarScrollSpeed.Minimum = 25;
|
this.trackBarScrollSpeed.Minimum = 25;
|
||||||
this.trackBarScrollSpeed.Name = "trackBarScrollSpeed";
|
this.trackBarScrollSpeed.Name = "trackBarScrollSpeed";
|
||||||
this.trackBarScrollSpeed.Size = new System.Drawing.Size(148, 30);
|
this.trackBarScrollSpeed.Size = new System.Drawing.Size(177, 30);
|
||||||
this.trackBarScrollSpeed.SmallChange = 5;
|
this.trackBarScrollSpeed.SmallChange = 5;
|
||||||
this.trackBarScrollSpeed.TabIndex = 0;
|
this.trackBarScrollSpeed.TabIndex = 0;
|
||||||
this.trackBarScrollSpeed.TickFrequency = 25;
|
this.trackBarScrollSpeed.TickFrequency = 25;
|
||||||
@@ -490,32 +496,32 @@
|
|||||||
//
|
//
|
||||||
this.panelTimer.Controls.Add(this.labelDurationValue);
|
this.panelTimer.Controls.Add(this.labelDurationValue);
|
||||||
this.panelTimer.Controls.Add(this.trackBarDuration);
|
this.panelTimer.Controls.Add(this.trackBarDuration);
|
||||||
this.panelTimer.Location = new System.Drawing.Point(0, 315);
|
this.panelTimer.Location = new System.Drawing.Point(0, 363);
|
||||||
this.panelTimer.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
|
this.panelTimer.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
|
||||||
this.panelTimer.Name = "panelTimer";
|
this.panelTimer.Name = "panelTimer";
|
||||||
this.panelTimer.Size = new System.Drawing.Size(300, 35);
|
this.panelTimer.Size = new System.Drawing.Size(300, 35);
|
||||||
this.panelTimer.TabIndex = 11;
|
this.panelTimer.TabIndex = 13;
|
||||||
//
|
//
|
||||||
// labelDuration
|
// labelDuration
|
||||||
//
|
//
|
||||||
this.labelDuration.AutoSize = true;
|
this.labelDuration.AutoSize = true;
|
||||||
this.labelDuration.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
|
this.labelDuration.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
|
||||||
this.labelDuration.Location = new System.Drawing.Point(3, 299);
|
this.labelDuration.Location = new System.Drawing.Point(3, 347);
|
||||||
this.labelDuration.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
this.labelDuration.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
||||||
this.labelDuration.Name = "labelDuration";
|
this.labelDuration.Name = "labelDuration";
|
||||||
this.labelDuration.Size = new System.Drawing.Size(54, 15);
|
this.labelDuration.Size = new System.Drawing.Size(54, 15);
|
||||||
this.labelDuration.TabIndex = 10;
|
this.labelDuration.TabIndex = 12;
|
||||||
this.labelDuration.Text = "Duration";
|
this.labelDuration.Text = "Duration";
|
||||||
//
|
//
|
||||||
// labelTimer
|
// labelTimer
|
||||||
//
|
//
|
||||||
this.labelTimer.AutoSize = true;
|
this.labelTimer.AutoSize = true;
|
||||||
this.labelTimer.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
|
this.labelTimer.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
|
||||||
this.labelTimer.Location = new System.Drawing.Point(0, 216);
|
this.labelTimer.Location = new System.Drawing.Point(0, 264);
|
||||||
this.labelTimer.Margin = new System.Windows.Forms.Padding(0, 40, 0, 1);
|
this.labelTimer.Margin = new System.Windows.Forms.Padding(0, 25, 0, 1);
|
||||||
this.labelTimer.Name = "labelTimer";
|
this.labelTimer.Name = "labelTimer";
|
||||||
this.labelTimer.Size = new System.Drawing.Size(50, 19);
|
this.labelTimer.Size = new System.Drawing.Size(50, 19);
|
||||||
this.labelTimer.TabIndex = 7;
|
this.labelTimer.TabIndex = 9;
|
||||||
this.labelTimer.Text = "TIMER";
|
this.labelTimer.Text = "TIMER";
|
||||||
//
|
//
|
||||||
// labelSize
|
// labelSize
|
||||||
@@ -555,6 +561,8 @@
|
|||||||
this.flowPanelLeft.Controls.Add(this.checkNonIntrusive);
|
this.flowPanelLeft.Controls.Add(this.checkNonIntrusive);
|
||||||
this.flowPanelLeft.Controls.Add(this.labelIdlePause);
|
this.flowPanelLeft.Controls.Add(this.labelIdlePause);
|
||||||
this.flowPanelLeft.Controls.Add(this.comboBoxIdlePause);
|
this.flowPanelLeft.Controls.Add(this.comboBoxIdlePause);
|
||||||
|
this.flowPanelLeft.Controls.Add(this.labelOpacity);
|
||||||
|
this.flowPanelLeft.Controls.Add(this.panelOpacity);
|
||||||
this.flowPanelLeft.Controls.Add(this.labelTimer);
|
this.flowPanelLeft.Controls.Add(this.labelTimer);
|
||||||
this.flowPanelLeft.Controls.Add(this.checkNotificationTimer);
|
this.flowPanelLeft.Controls.Add(this.checkNotificationTimer);
|
||||||
this.flowPanelLeft.Controls.Add(this.checkTimerCountDown);
|
this.flowPanelLeft.Controls.Add(this.checkTimerCountDown);
|
||||||
@@ -568,6 +576,52 @@
|
|||||||
this.flowPanelLeft.TabIndex = 0;
|
this.flowPanelLeft.TabIndex = 0;
|
||||||
this.flowPanelLeft.WrapContents = false;
|
this.flowPanelLeft.WrapContents = false;
|
||||||
//
|
//
|
||||||
|
// labelOpacity
|
||||||
|
//
|
||||||
|
this.labelOpacity.AutoSize = true;
|
||||||
|
this.labelOpacity.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.labelOpacity.Location = new System.Drawing.Point(3, 188);
|
||||||
|
this.labelOpacity.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
|
||||||
|
this.labelOpacity.Name = "labelOpacity";
|
||||||
|
this.labelOpacity.Size = new System.Drawing.Size(48, 15);
|
||||||
|
this.labelOpacity.TabIndex = 7;
|
||||||
|
this.labelOpacity.Text = "Opacity";
|
||||||
|
//
|
||||||
|
// panelOpacity
|
||||||
|
//
|
||||||
|
this.panelOpacity.Controls.Add(this.labelOpacityValue);
|
||||||
|
this.panelOpacity.Controls.Add(this.trackBarOpacity);
|
||||||
|
this.panelOpacity.Location = new System.Drawing.Point(0, 204);
|
||||||
|
this.panelOpacity.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
|
||||||
|
this.panelOpacity.Name = "panelOpacity";
|
||||||
|
this.panelOpacity.Size = new System.Drawing.Size(300, 35);
|
||||||
|
this.panelOpacity.TabIndex = 8;
|
||||||
|
//
|
||||||
|
// labelOpacityValue
|
||||||
|
//
|
||||||
|
this.labelOpacityValue.BackColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.labelOpacityValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
|
this.labelOpacityValue.Location = new System.Drawing.Point(176, 4);
|
||||||
|
this.labelOpacityValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
|
this.labelOpacityValue.Name = "labelOpacityValue";
|
||||||
|
this.labelOpacityValue.Size = new System.Drawing.Size(38, 15);
|
||||||
|
this.labelOpacityValue.TabIndex = 1;
|
||||||
|
this.labelOpacityValue.Text = "100%";
|
||||||
|
this.labelOpacityValue.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// trackBarOpacity
|
||||||
|
//
|
||||||
|
this.trackBarOpacity.AutoSize = false;
|
||||||
|
this.trackBarOpacity.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.trackBarOpacity.Maximum = 100;
|
||||||
|
this.trackBarOpacity.Minimum = 20;
|
||||||
|
this.trackBarOpacity.Name = "trackBarOpacity";
|
||||||
|
this.trackBarOpacity.Size = new System.Drawing.Size(177, 30);
|
||||||
|
this.trackBarOpacity.SmallChange = 5;
|
||||||
|
this.trackBarOpacity.TabIndex = 0;
|
||||||
|
this.trackBarOpacity.TickFrequency = 10;
|
||||||
|
this.trackBarOpacity.Value = 100;
|
||||||
|
//
|
||||||
// panelScrollSpeed
|
// panelScrollSpeed
|
||||||
//
|
//
|
||||||
this.panelScrollSpeed.Controls.Add(this.trackBarScrollSpeed);
|
this.panelScrollSpeed.Controls.Add(this.trackBarScrollSpeed);
|
||||||
@@ -630,6 +684,8 @@
|
|||||||
this.panelSize.ResumeLayout(false);
|
this.panelSize.ResumeLayout(false);
|
||||||
this.flowPanelLeft.ResumeLayout(false);
|
this.flowPanelLeft.ResumeLayout(false);
|
||||||
this.flowPanelLeft.PerformLayout();
|
this.flowPanelLeft.PerformLayout();
|
||||||
|
this.panelOpacity.ResumeLayout(false);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.trackBarOpacity)).EndInit();
|
||||||
this.panelScrollSpeed.ResumeLayout(false);
|
this.panelScrollSpeed.ResumeLayout(false);
|
||||||
this.flowPanelRight.ResumeLayout(false);
|
this.flowPanelRight.ResumeLayout(false);
|
||||||
this.flowPanelRight.PerformLayout();
|
this.flowPanelRight.PerformLayout();
|
||||||
@@ -682,5 +738,9 @@
|
|||||||
private System.Windows.Forms.Panel panelScrollSpeed;
|
private System.Windows.Forms.Panel panelScrollSpeed;
|
||||||
private System.Windows.Forms.FlowLayoutPanel flowPanelRight;
|
private System.Windows.Forms.FlowLayoutPanel flowPanelRight;
|
||||||
private System.Windows.Forms.Panel panelSeparator;
|
private System.Windows.Forms.Panel panelSeparator;
|
||||||
|
private System.Windows.Forms.Label labelOpacity;
|
||||||
|
private System.Windows.Forms.Panel panelOpacity;
|
||||||
|
private System.Windows.Forms.Label labelOpacityValue;
|
||||||
|
private System.Windows.Forms.TrackBar trackBarOpacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -48,6 +48,9 @@ namespace TweetDuck.Dialogs.Settings{
|
|||||||
comboBoxIdlePause.Items.Add("5 minutes");
|
comboBoxIdlePause.Items.Add("5 minutes");
|
||||||
comboBoxIdlePause.SelectedIndex = Math.Max(0, Array.FindIndex(IdlePauseSeconds, val => val == Config.NotificationIdlePauseSeconds));
|
comboBoxIdlePause.SelectedIndex = Math.Max(0, Array.FindIndex(IdlePauseSeconds, val => val == Config.NotificationIdlePauseSeconds));
|
||||||
|
|
||||||
|
trackBarOpacity.SetValueSafe(Config.NotificationWindowOpacity);
|
||||||
|
labelOpacityValue.Text = Config.NotificationWindowOpacity + "%";
|
||||||
|
|
||||||
// timer
|
// timer
|
||||||
|
|
||||||
toolTip.SetToolTip(checkTimerCountDown, "The notification timer counts down instead of up.");
|
toolTip.SetToolTip(checkTimerCountDown, "The notification timer counts down instead of up.");
|
||||||
@@ -105,6 +108,7 @@ namespace TweetDuck.Dialogs.Settings{
|
|||||||
checkSkipOnLinkClick.CheckedChanged += checkSkipOnLinkClick_CheckedChanged;
|
checkSkipOnLinkClick.CheckedChanged += checkSkipOnLinkClick_CheckedChanged;
|
||||||
checkNonIntrusive.CheckedChanged += checkNonIntrusive_CheckedChanged;
|
checkNonIntrusive.CheckedChanged += checkNonIntrusive_CheckedChanged;
|
||||||
comboBoxIdlePause.SelectedValueChanged += comboBoxIdlePause_SelectedValueChanged;
|
comboBoxIdlePause.SelectedValueChanged += comboBoxIdlePause_SelectedValueChanged;
|
||||||
|
trackBarOpacity.ValueChanged += trackBarOpacity_ValueChanged;
|
||||||
|
|
||||||
checkNotificationTimer.CheckedChanged += checkNotificationTimer_CheckedChanged;
|
checkNotificationTimer.CheckedChanged += checkNotificationTimer_CheckedChanged;
|
||||||
checkTimerCountDown.CheckedChanged += checkTimerCountDown_CheckedChanged;
|
checkTimerCountDown.CheckedChanged += checkTimerCountDown_CheckedChanged;
|
||||||
@@ -176,6 +180,13 @@ namespace TweetDuck.Dialogs.Settings{
|
|||||||
Config.NotificationIdlePauseSeconds = IdlePauseSeconds[comboBoxIdlePause.SelectedIndex];
|
Config.NotificationIdlePauseSeconds = IdlePauseSeconds[comboBoxIdlePause.SelectedIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void trackBarOpacity_ValueChanged(object sender, EventArgs e){
|
||||||
|
if (trackBarOpacity.AlignValueToTick()){
|
||||||
|
Config.NotificationWindowOpacity = trackBarOpacity.Value;
|
||||||
|
labelOpacityValue.Text = Config.NotificationWindowOpacity + "%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
#region Timer
|
#region Timer
|
||||||
|
|
||||||
|
4
Dialogs/Settings/TabSettingsSounds.Designer.cs
generated
4
Dialogs/Settings/TabSettingsSounds.Designer.cs
generated
@@ -57,7 +57,7 @@
|
|||||||
//
|
//
|
||||||
this.labelVolumeValue.BackColor = System.Drawing.Color.Transparent;
|
this.labelVolumeValue.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.labelVolumeValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
this.labelVolumeValue.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||||
this.labelVolumeValue.Location = new System.Drawing.Point(147, 4);
|
this.labelVolumeValue.Location = new System.Drawing.Point(176, 4);
|
||||||
this.labelVolumeValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
this.labelVolumeValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
|
||||||
this.labelVolumeValue.Name = "labelVolumeValue";
|
this.labelVolumeValue.Name = "labelVolumeValue";
|
||||||
this.labelVolumeValue.Size = new System.Drawing.Size(38, 15);
|
this.labelVolumeValue.Size = new System.Drawing.Size(38, 15);
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
this.trackBarVolume.Location = new System.Drawing.Point(3, 3);
|
this.trackBarVolume.Location = new System.Drawing.Point(3, 3);
|
||||||
this.trackBarVolume.Maximum = 100;
|
this.trackBarVolume.Maximum = 100;
|
||||||
this.trackBarVolume.Name = "trackBarVolume";
|
this.trackBarVolume.Name = "trackBarVolume";
|
||||||
this.trackBarVolume.Size = new System.Drawing.Size(148, 30);
|
this.trackBarVolume.Size = new System.Drawing.Size(177, 30);
|
||||||
this.trackBarVolume.TabIndex = 0;
|
this.trackBarVolume.TabIndex = 0;
|
||||||
this.trackBarVolume.TickFrequency = 10;
|
this.trackBarVolume.TickFrequency = 10;
|
||||||
this.trackBarVolume.Value = 100;
|
this.trackBarVolume.Value = 100;
|
||||||
|
@@ -14,8 +14,8 @@ using TweetDuck.Management;
|
|||||||
using TweetDuck.Resources;
|
using TweetDuck.Resources;
|
||||||
using TweetDuck.Utils;
|
using TweetDuck.Utils;
|
||||||
using TweetLib.Core;
|
using TweetLib.Core;
|
||||||
using TweetLib.Core.Application.Helpers;
|
|
||||||
using TweetLib.Core.Collections;
|
using TweetLib.Core.Collections;
|
||||||
|
using TweetLib.Core.Systems.Startup;
|
||||||
using TweetLib.Core.Utils;
|
using TweetLib.Core.Utils;
|
||||||
using Win = System.Windows.Forms;
|
using Win = System.Windows.Forms;
|
||||||
|
|
||||||
|
@@ -871,8 +871,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
uploader.addFilesToUpload([ item.getAsFile() ]);
|
uploader.addFilesToUpload([ item.getAsFile() ]);
|
||||||
|
|
||||||
$(".js-compose-text", ".js-docked-compose").focus();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1068,6 +1066,33 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
// Block: Fix docked composer not re-focusing after Alt+Tab & image upload.
|
||||||
|
//
|
||||||
|
onAppReady.push(function fixDockedComposerRefocus(){
|
||||||
|
$(document).on("tduckOldComposerActive", function(e){
|
||||||
|
const ele = $$(".js-compose-text", ".js-docked-compose");
|
||||||
|
const node = ele[0];
|
||||||
|
|
||||||
|
let cancelBlur = false;
|
||||||
|
|
||||||
|
ele.on("blur", function(e){
|
||||||
|
cancelBlur = true;
|
||||||
|
setTimeout(function(){ cancelBlur = false; }, 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
window.TDGF_prioritizeNewestEvent(node, "blur");
|
||||||
|
|
||||||
|
node.blur = prependToFunction(node.blur, function(){
|
||||||
|
return cancelBlur;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("uiComposeImageAdded", function(){
|
||||||
|
$(".js-compose-text", ".js-docked-compose").focus();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Refocus the textbox after switching accounts.
|
// Block: Refocus the textbox after switching accounts.
|
||||||
//
|
//
|
||||||
|
@@ -68,22 +68,13 @@ button[type='submit'] {
|
|||||||
/* General per-page styling */
|
/* General per-page styling */
|
||||||
/****************************/
|
/****************************/
|
||||||
|
|
||||||
html[mobile][login] div[tweetduck-login-wrapper] {
|
html[login] div[tweetduck-login-wrapper] {
|
||||||
/* vertically center page & fix colors */
|
/* vertically center page & fix colors */
|
||||||
margin-top: calc(50vh - 200px);
|
margin-top: calc(50vh - 200px);
|
||||||
padding: 26px 1.1vw;
|
padding: 26px 1.1vw;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[mobile][login] #tweetduck-helper:hover {
|
html[login] #tweetduck-helper:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
html[desktop][login] #tweetduck-helper {
|
|
||||||
margin-top: 15px !important;
|
|
||||||
font-weight: bold !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
html[mobile][logout] div[role="button"] {
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.3) !important;
|
|
||||||
}
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
(function(){
|
(function(){
|
||||||
const isLogin = location.pathname === "/login";
|
const isLogin = location.pathname === "/login";
|
||||||
const isLogout = location.pathname === "/logout";
|
const isLogout = location.pathname === "/logout";
|
||||||
const isMobile = location.host === "mobile.twitter.com";
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Function: Inject custom CSS into the page.
|
// Function: Inject custom CSS into the page.
|
||||||
@@ -24,13 +23,6 @@
|
|||||||
else if (isLogout){
|
else if (isLogout){
|
||||||
document.documentElement.setAttribute("logout", "");
|
document.documentElement.setAttribute("logout", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMobile){
|
|
||||||
document.documentElement.setAttribute("mobile", "");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
document.documentElement.setAttribute("desktop", "");
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
setTimeout(injectCSS, 1);
|
setTimeout(injectCSS, 1);
|
||||||
@@ -53,84 +45,57 @@
|
|||||||
//
|
//
|
||||||
if (isLogin){
|
if (isLogin){
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
if (isMobile){
|
triggerWhenExists("main h1", function(heading){
|
||||||
triggerWhenExists("main h1", function(heading){
|
heading.parentNode.setAttribute("tweetduck-login-wrapper", "");
|
||||||
heading.parentNode.setAttribute("tweetduck-login-wrapper", "");
|
return true;
|
||||||
return true;
|
});
|
||||||
});
|
|
||||||
|
|
||||||
triggerWhenExists("a[href='/i/flow/signup']", function(texts){
|
triggerWhenExists("a[href='/i/flow/signup']", function(texts){
|
||||||
texts = texts.parentNode;
|
texts = texts.parentNode;
|
||||||
|
|
||||||
let link = texts.childNodes[0];
|
let link = texts.childNodes[0];
|
||||||
let separator = texts.childNodes[1];
|
let separator = texts.childNodes[1];
|
||||||
|
|
||||||
if (link && separator){
|
if (link && separator){
|
||||||
texts.classList.add("tweetduck-login-links");
|
texts.classList.add("tweetduck-login-links");
|
||||||
|
|
||||||
link = link.cloneNode(false);
|
link = link.cloneNode(false);
|
||||||
link.id = "tweetduck-helper";
|
link.id = "tweetduck-helper";
|
||||||
link.href = "#";
|
link.href = "#";
|
||||||
link.innerText = "Import TweetDuck profile";
|
link.innerText = "Import TweetDuck profile";
|
||||||
|
|
||||||
texts.appendChild(separator.cloneNode(true));
|
texts.appendChild(separator.cloneNode(true));
|
||||||
texts.appendChild(link);
|
texts.appendChild(link);
|
||||||
|
|
||||||
link.addEventListener("click", function(){
|
link.addEventListener("click", function(){
|
||||||
$TD.openProfileImport();
|
|
||||||
});
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
const openLinkExternally = function(e){
|
|
||||||
let href = e.currentTarget.getAttribute("href");
|
|
||||||
$TD.openBrowser(href[0] === '/' ? location.origin+href : href);
|
|
||||||
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
};
|
|
||||||
|
|
||||||
for(let link of document.getElementsByTagName("A")){
|
|
||||||
link.addEventListener("click", openLinkExternally);
|
|
||||||
}
|
|
||||||
|
|
||||||
let texts = document.querySelector(".page-canvas > div:last-child");
|
|
||||||
|
|
||||||
if (texts){
|
|
||||||
texts.insertAdjacentHTML("beforeend", `<p id="tweetduck-helper">Used the TweetDuck app before? <a href="#">Import your profile »</a></p>`);
|
|
||||||
|
|
||||||
texts.querySelector("#tweetduck-helper > a").addEventListener("click", function(){
|
|
||||||
$TD.openProfileImport();
|
$TD.openProfileImport();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Block: Hide cookie crap.
|
// Block: Hide cookie crap.
|
||||||
//
|
//
|
||||||
if (isMobile){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
triggerWhenExists("a[href^='https://help.twitter.com/rules-and-policies/twitter-cookies']", function(cookie){
|
||||||
triggerWhenExists("a[href^='https://help.twitter.com/rules-and-policies/twitter-cookies']", function(cookie){
|
while(!!cookie){
|
||||||
while(!!cookie){
|
if (cookie.offsetHeight > 30){
|
||||||
if (cookie.offsetHeight > 30){
|
cookie.remove();
|
||||||
cookie.remove();
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
cookie = cookie.parentNode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
cookie = cookie.parentNode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
})();
|
})();
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
|
|
||||||
namespace TweetDuck.Updates{
|
namespace TweetDuck.Updates{
|
||||||
sealed partial class FormUpdateDownload : Form{
|
sealed partial class FormUpdateDownload : Form{
|
||||||
|
@@ -6,7 +6,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web.Script.Serialization;
|
using System.Web.Script.Serialization;
|
||||||
using TweetDuck.Utils;
|
using TweetDuck.Utils;
|
||||||
using TweetLib.Core.Features.Updates;
|
using TweetLib.Core.Systems.Updates;
|
||||||
using TweetLib.Core.Utils;
|
using TweetLib.Core.Utils;
|
||||||
using JsonObject = System.Collections.Generic.IDictionary<string, object>;
|
using JsonObject = System.Collections.Generic.IDictionary<string, object>;
|
||||||
|
|
||||||
|
@@ -6,6 +6,6 @@ using Version = TweetDuck.Version;
|
|||||||
|
|
||||||
namespace TweetDuck{
|
namespace TweetDuck{
|
||||||
internal static class Version{
|
internal static class Version{
|
||||||
public const string Tag = "1.18.4";
|
public const string Tag = "1.18.6";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using TweetLib.Core.Features.Configuration;
|
using TweetLib.Core.Systems.Configuration;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Plugins.Config{
|
namespace TweetLib.Core.Features.Plugins.Config{
|
||||||
public sealed class PluginConfigInstance<T> : IConfigInstance<T> where T : BaseConfig, IPluginConfig{
|
public sealed class PluginConfigInstance<T> : IConfigInstance<T> where T : BaseConfig, IPluginConfig{
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Configuration{
|
namespace TweetLib.Core.Systems.Configuration{
|
||||||
public abstract class BaseConfig{
|
public abstract class BaseConfig{
|
||||||
private readonly IConfigManager configManager;
|
private readonly IConfigManager configManager;
|
||||||
|
|
@@ -2,7 +2,7 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using TweetLib.Core.Serialization;
|
using TweetLib.Core.Serialization;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Configuration{
|
namespace TweetLib.Core.Systems.Configuration{
|
||||||
public sealed class FileConfigInstance<T> : IConfigInstance<T> where T : BaseConfig{
|
public sealed class FileConfigInstance<T> : IConfigInstance<T> where T : BaseConfig{
|
||||||
public T Instance { get; }
|
public T Instance { get; }
|
||||||
public FileSerializer<T> Serializer { get; }
|
public FileSerializer<T> Serializer { get; }
|
@@ -1,4 +1,4 @@
|
|||||||
namespace TweetLib.Core.Features.Configuration{
|
namespace TweetLib.Core.Systems.Configuration{
|
||||||
public interface IConfigInstance<out T>{
|
public interface IConfigInstance<out T>{
|
||||||
T Instance { get; }
|
T Instance { get; }
|
||||||
|
|
@@ -1,4 +1,4 @@
|
|||||||
namespace TweetLib.Core.Features.Configuration{
|
namespace TweetLib.Core.Systems.Configuration{
|
||||||
public interface IConfigManager{
|
public interface IConfigManager{
|
||||||
void TriggerProgramRestartRequested();
|
void TriggerProgramRestartRequested();
|
||||||
IConfigInstance<BaseConfig> GetInstanceInfo(BaseConfig instance);
|
IConfigInstance<BaseConfig> GetInstanceInfo(BaseConfig instance);
|
@@ -4,7 +4,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace TweetLib.Core.Application.Helpers{
|
namespace TweetLib.Core.Systems.Startup{
|
||||||
public sealed class LockManager{
|
public sealed class LockManager{
|
||||||
private const int RetryDelay = 250;
|
private const int RetryDelay = 250;
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Updates{
|
namespace TweetLib.Core.Systems.Updates{
|
||||||
public interface IUpdateCheckClient{
|
public interface IUpdateCheckClient{
|
||||||
bool CanCheck { get; }
|
bool CanCheck { get; }
|
||||||
Task<UpdateInfo> Check();
|
Task<UpdateInfo> Check();
|
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using TweetLib.Core.Data;
|
using TweetLib.Core.Data;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Updates{
|
namespace TweetLib.Core.Systems.Updates{
|
||||||
public sealed class UpdateCheckEventArgs : EventArgs{
|
public sealed class UpdateCheckEventArgs : EventArgs{
|
||||||
public int EventId { get; }
|
public int EventId { get; }
|
||||||
public Result<UpdateInfo> Result { get; }
|
public Result<UpdateInfo> Result { get; }
|
@@ -1,4 +1,4 @@
|
|||||||
namespace TweetLib.Core.Features.Updates{
|
namespace TweetLib.Core.Systems.Updates{
|
||||||
public enum UpdateDownloadStatus{
|
public enum UpdateDownloadStatus{
|
||||||
None = 0,
|
None = 0,
|
||||||
InProgress,
|
InProgress,
|
@@ -5,7 +5,7 @@ using System.Timers;
|
|||||||
using TweetLib.Core.Data;
|
using TweetLib.Core.Data;
|
||||||
using Timer = System.Timers.Timer;
|
using Timer = System.Timers.Timer;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Updates{
|
namespace TweetLib.Core.Systems.Updates{
|
||||||
public sealed class UpdateHandler : IDisposable{
|
public sealed class UpdateHandler : IDisposable{
|
||||||
public const int CheckCodeUpdatesDisabled = -1;
|
public const int CheckCodeUpdatesDisabled = -1;
|
||||||
|
|
@@ -3,7 +3,7 @@ using System.IO;
|
|||||||
using System.Net;
|
using System.Net;
|
||||||
using TweetLib.Core.Utils;
|
using TweetLib.Core.Utils;
|
||||||
|
|
||||||
namespace TweetLib.Core.Features.Updates{
|
namespace TweetLib.Core.Systems.Updates{
|
||||||
public sealed class UpdateInfo{
|
public sealed class UpdateInfo{
|
||||||
public string VersionTag { get; }
|
public string VersionTag { get; }
|
||||||
public string ReleaseNotes { get; }
|
public string ReleaseNotes { get; }
|
Reference in New Issue
Block a user