mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-20 21:15:48 +02:00
Minor refactoring of notification classes & remove no longer needed CSS
This commit is contained in:
parent
fb1482370a
commit
b4e936c530
@ -110,6 +110,8 @@ protected virtual FormBorderStyle NotificationBorderStyle{
|
||||
public bool CanViewDetail => currentNotification != null && !string.IsNullOrEmpty(currentNotification.ColumnId) && !string.IsNullOrEmpty(currentNotification.ChirpId);
|
||||
public bool IsPaused => pauseCounter > 0;
|
||||
|
||||
protected bool IsCursorOverBrowser => browser.Bounds.Contains(PointToClient(Cursor.Position));
|
||||
|
||||
public bool FreezeTimer { get; set; }
|
||||
public bool ContextMenuOpen { get; set; }
|
||||
|
||||
@ -201,8 +203,7 @@ public virtual void ResumeNotification(){
|
||||
}
|
||||
|
||||
protected virtual string GetTweetHTML(TweetNotification tweet){
|
||||
string bodyClasses = browser.Bounds.Contains(PointToClient(Cursor.Position)) ? "td-hover" : string.Empty;
|
||||
return tweet.GenerateHtml(bodyClasses);
|
||||
return tweet.GenerateHtml(IsCursorOverBrowser ? "td-hover" : string.Empty);
|
||||
}
|
||||
|
||||
protected virtual void LoadTweet(TweetNotification tweet){
|
||||
|
@ -113,8 +113,8 @@ private IntPtr MouseHookProc(int nCode, IntPtr wParam, IntPtr lParam){
|
||||
if (nCode == 0){
|
||||
int eventType = wParam.ToInt32();
|
||||
|
||||
if (eventType == NativeMethods.WM_MOUSEWHEEL && browser.Bounds.Contains(PointToClient(Cursor.Position))){
|
||||
browser.SendMouseWheelEvent(0, 0, 0, BrowserUtils.Scale(NativeMethods.GetMouseHookData(lParam), Program.UserConfig.NotificationScrollSpeed/100.0), CefEventFlags.None);
|
||||
if (eventType == NativeMethods.WM_MOUSEWHEEL && IsCursorOverBrowser){
|
||||
browser.SendMouseWheelEvent(0, 0, 0, BrowserUtils.Scale(NativeMethods.GetMouseHookData(lParam), Program.UserConfig.NotificationScrollSpeed*0.01), CefEventFlags.None);
|
||||
return NativeMethods.HOOK_HANDLED;
|
||||
}
|
||||
else if (eventType == NativeMethods.WM_XBUTTONDOWN && DesktopBounds.Contains(Cursor.Position)){
|
||||
|
@ -204,11 +204,6 @@ html[data-td-font='smallest'] .tweet-detail-wrapper .badge-verified:before {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.is-inverted-dark .inline-reply .btn:hover {
|
||||
/* Reply buttons in modals are bork */
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
/* Fix glaring visual issues that twitter hasn't fixed yet smh */
|
||||
/***************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user