adium 3795:3cce792ed10b: Another iteration of the floating input...
commits at adium.im
commits at adium.im
Thu Mar 31 22:07:51 UTC 2011
details: http://hg.adium.im/adium/rev/3cce792ed10b
revision: 3795:3cce792ed10b
branch: FloatingMessageWindowTextField
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Fri Apr 01 00:07:40 2011 +0200
Another iteration of the floating input field idea:
* Make shadow internal. Remove the fixed border.
* Add an "inputBox" div, whose bounds are used to position the text field (doesn't reposition when it needs to yet, though).
* Make Mockie look nice by placing the image next to the text field. :)
diffs (179 lines):
diff -r 7dc5398115ce -r 3cce792ed10b Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Thu Mar 31 03:20:18 2011 +0200
+++ b/Adium.xcodeproj/project.pbxproj Fri Apr 01 00:07:40 2011 +0200
@@ -3102,7 +3102,7 @@
346C9C200E70E1F8002314EE /* hu */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = hu; path = "Plugins/WebKit Message View/hu.lproj/WebKitPreferencesView.nib"; sourceTree = "<group>"; };
346CFDC4087B7836009711C8 /* AdiumIdleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AdiumIdleManager.h; path = Source/AdiumIdleManager.h; sourceTree = "<group>"; };
346CFDC5087B7836009711C8 /* AdiumIdleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AdiumIdleManager.m; path = Source/AdiumIdleManager.m; sourceTree = "<group>"; };
- 346F5CB308A418FB0055C610 /* CurrentTunes.scpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.scpt; name = CurrentTunes.scpt; path = Resources/CurrentTunes.scpt; sourceTree = "<group>"; };
+ 346F5CB308A418FB0055C610 /* CurrentTunes.scpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = file; name = CurrentTunes.scpt; path = Resources/CurrentTunes.scpt; sourceTree = "<group>"; };
347065E406015DC5004F0D20 /* WebKit Defaults.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = "WebKit Defaults.plist"; path = "Plugins/WebKit Message View/WebKit Defaults.plist"; sourceTree = "<group>"; };
347374BC0AA9206B00AD18E3 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/ShortcutRecorder.strings; sourceTree = "<group>"; };
347374F00AA920F300AD18E3 /* ca */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = ca; path = Resources/ca.lproj/ShortcutRecorder.strings; sourceTree = "<group>"; };
@@ -3890,7 +3890,7 @@
34F4675B080F46AC007800AB /* ESBonjourAccountView.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; path = ESBonjourAccountView.nib; sourceTree = "<group>"; };
34F4675C080F46AC007800AB /* AWBonjourService.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AWBonjourService.m; sourceTree = "<group>"; };
34F4675D080F46AC007800AB /* AWBonjourService.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AWBonjourService.h; sourceTree = "<group>"; };
- 34F46778080F49C5007800AB /* Safari.scpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.scpt; name = Safari.scpt; path = Resources/Safari.scpt; sourceTree = "<group>"; };
+ 34F46778080F49C5007800AB /* Safari.scpt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = file; name = Safari.scpt; path = Resources/Safari.scpt; sourceTree = "<group>"; };
34F46779080F49C5007800AB /* Safari.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Safari.png; path = Resources/Safari.png; sourceTree = "<group>"; };
34F46783080F7FFB007800AB /* ESSafariLinkToolbarItemPlugin.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = ESSafariLinkToolbarItemPlugin.m; path = Source/ESSafariLinkToolbarItemPlugin.m; sourceTree = "<group>"; };
34F46784080F7FFB007800AB /* ESSafariLinkToolbarItemPlugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ESSafariLinkToolbarItemPlugin.h; path = Source/ESSafariLinkToolbarItemPlugin.h; sourceTree = "<group>"; };
@@ -4552,12 +4552,12 @@
6360B2590BF2EB93004CD99B /* AIWebKitDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIWebKitDelegate.m; path = "Plugins/WebKit Message View/AIWebKitDelegate.m"; sourceTree = "<group>"; };
636C6E5D0ED56D0100E0E528 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = /usr/lib/libcrypto.dylib; sourceTree = "<absolute>"; };
636D8C970E4E95A500E5F558 /* AIAddressBookController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIAddressBookController.m; path = "Frameworks/Adium Framework/Source/AIAddressBookController.m"; sourceTree = "<group>"; };
- 636D93660E4E9FD300E5F558 /* AdiumAddressBookAction_Yahoo.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_Yahoo.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_Yahoo.scpt"; sourceTree = "<group>"; };
- 636D93670E4E9FD300E5F558 /* AdiumAddressBookAction_SMS.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_SMS.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_SMS.scpt"; sourceTree = "<group>"; };
- 636D93680E4E9FD300E5F558 /* AdiumAddressBookAction_MSN.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_MSN.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_MSN.scpt"; sourceTree = "<group>"; };
- 636D93690E4E9FD300E5F558 /* AdiumAddressBookAction_Jabber.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_Jabber.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_Jabber.scpt"; sourceTree = "<group>"; };
- 636D936A0E4E9FD300E5F558 /* AdiumAddressBookAction_ICQ.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_ICQ.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_ICQ.scpt"; sourceTree = "<group>"; };
- 636D936B0E4E9FD300E5F558 /* AdiumAddressBookAction_AIM.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.scpt; name = AdiumAddressBookAction_AIM.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_AIM.scpt"; sourceTree = "<group>"; };
+ 636D93660E4E9FD300E5F558 /* AdiumAddressBookAction_Yahoo.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_Yahoo.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_Yahoo.scpt"; sourceTree = "<group>"; };
+ 636D93670E4E9FD300E5F558 /* AdiumAddressBookAction_SMS.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_SMS.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_SMS.scpt"; sourceTree = "<group>"; };
+ 636D93680E4E9FD300E5F558 /* AdiumAddressBookAction_MSN.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_MSN.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_MSN.scpt"; sourceTree = "<group>"; };
+ 636D93690E4E9FD300E5F558 /* AdiumAddressBookAction_Jabber.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_Jabber.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_Jabber.scpt"; sourceTree = "<group>"; };
+ 636D936A0E4E9FD300E5F558 /* AdiumAddressBookAction_ICQ.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_ICQ.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_ICQ.scpt"; sourceTree = "<group>"; };
+ 636D936B0E4E9FD300E5F558 /* AdiumAddressBookAction_AIM.scpt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = AdiumAddressBookAction_AIM.scpt; path = "Frameworks/Adium Framework/Resources/AdiumAddressBookAction_AIM.scpt"; sourceTree = "<group>"; };
638392F609D4D67A0067B9B7 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = Frameworks/Sparkle.framework; sourceTree = "<group>"; };
638BC1FA0FC932E000CE7600 /* AIObjectDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AIObjectDebug.h; path = Source/AIObjectDebug.h; sourceTree = "<group>"; };
638BC1FB0FC932E000CE7600 /* AIObjectDebug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AIObjectDebug.m; path = Source/AIObjectDebug.m; sourceTree = "<group>"; };
@@ -9553,6 +9553,7 @@
};
buildConfigurationList = DADE8E3A085507450062B664 /* Build configuration list for PBXProject "Adium" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
diff -r 7dc5398115ce -r 3cce792ed10b Plugins/Dual Window Interface/MessageView.nib/keyedobjects.nib
Binary file Plugins/Dual Window Interface/MessageView.nib/keyedobjects.nib has changed
diff -r 7dc5398115ce -r 3cce792ed10b Plugins/WebKit Message View/Template.html
--- a/Plugins/WebKit Message View/Template.html Thu Mar 31 03:20:18 2011 +0200
+++ b/Plugins/WebKit Message View/Template.html Fri Apr 01 00:07:40 2011 +0200
@@ -323,7 +323,21 @@
img.scaledToFitImage { height: auto; max-width: 100%%; }
#Chat {
- padding-bottom: 50px !important;
+ padding-bottom: 50px !important;
+ }
+
+ #inputRect {
+ position: fixed;
+ bottom: 0px !important;
+ left: 0px !important;
+ right: 0px !important;
+ padding: 10px 10px 10px 10px;
+ }
+
+ #inputBox {
+ height: 20px !important;
+ width: 100%;
+ background-color: cyan !important;
}
</style>
@@ -343,5 +357,6 @@
<div id="Chat">
</div>
%@
+<div id="inputRect"><div id="inputBox">This is a box.</div></div>
</body>
</html>
diff -r 7dc5398115ce -r 3cce792ed10b Resources/Message Styles/Mockie.AdiumMessageStyle/Contents/Resources/Styles/basestyle.css
--- a/Resources/Message Styles/Mockie.AdiumMessageStyle/Contents/Resources/Styles/basestyle.css Thu Mar 31 03:20:18 2011 +0200
+++ b/Resources/Message Styles/Mockie.AdiumMessageStyle/Contents/Resources/Styles/basestyle.css Fri Apr 01 00:07:40 2011 +0200
@@ -239,3 +239,15 @@
{
-webkit-border-radius: 3px;
}
+
+#inputRect {
+ padding-left: 47px;
+ padding-right: 10px;
+ padding-bottom: 22px;
+}
+
+#inputImage {
+ position: fixed;
+ bottom: 10px;
+ left: 10px;
+}
\ No newline at end of file
diff -r 7dc5398115ce -r 3cce792ed10b Source/AIPrettyView.m
--- a/Source/AIPrettyView.m Thu Mar 31 03:20:18 2011 +0200
+++ b/Source/AIPrettyView.m Fri Apr 01 00:07:40 2011 +0200
@@ -16,7 +16,8 @@
#import "AIPrettyView.h"
#import <AIUtilities/AIBezierPathAdditions.h>
-
+#import <WebKit/DOMCSSStyleDeclaration.h>
+#import "ESWebView.h"
@implementation AIPrettyView
@@ -30,21 +31,53 @@
- (void)drawRect:(NSRect)dirtyRect {
- NSRect insetRect = NSMakeRect(self.frame.origin.x + 5, self.frame.origin.y + 5, self.frame.size.width - 10, self.frame.size.height - 10);
+ ESWebView *webView = [[[messageView contentView] subviews] objectAtIndex:0];
+ DOMElement *box = [[webView mainFrameDocument] getElementById:@"inputBox"];
+
+ if (box) {
+
+ double width = box.offsetWidth;
+ double height = box.offsetHeight;
+ double originX = 1 + box.offsetLeft;
+
+ DOMElement *el = box;
+
+ double originY = 0;
+
+ while (el) {
+ originY += el.offsetTop;
+
+ el = [el offsetParent];
+ }
+
+ originY = (1 + [[webView mainFrame] frameView].frame.size.height - originY) - height;
+
+ [[self enclosingScrollView] setFrame:NSMakeRect(originX, originY, width, height)];
+
+ NSLog(@"Setting frame: %@", NSStringFromRect(NSMakeRect(originX, originY, width, height)));
+ }
+
+ NSBezierPath *bp = [NSBezierPath bezierPath];
+ [bp setLineWidth:2.0];
- if ([[[[[[[[messageView contentView] subviews] objectAtIndex:0] subviews] objectAtIndex:0] subviews] objectAtIndex:0] hasVerticalScroller]) {
- insetRect.size.width -= [messageView verticalScroller].frame.size.width;
- }
+ [bp moveToPoint:NSMakePoint(0, self.frame.size.height)];
+ [bp lineToPoint:NSMakePoint(0, 0)];
+ [bp lineToPoint:NSMakePoint(self.frame.size.width, 0)];
+ [bp lineToPoint:NSMakePoint(self.frame.size.width, self.frame.size.height)];
- NSBezierPath *bp = [NSBezierPath bezierPathWithRoundedRect:insetRect radius:5.0];
+ [[NSColor colorWithCalibratedWhite:0.745 alpha:1.0] setStroke];
- [[NSColor whiteColor] set];
+ [bp stroke];
- [bp fill];
+ bp = [NSBezierPath bezierPath];
+ [bp setLineWidth:2.0];
- NSRect entryRect = NSMakeRect(10, 10, insetRect.size.width - 10, insetRect.size.height - 10);
+ [bp moveToPoint:NSMakePoint(0, self.frame.size.height)];
+ [bp lineToPoint:NSMakePoint(self.frame.size.width, self.frame.size.height)];
- [entryField enclosingScrollView].frame = entryRect;
+ [[NSColor colorWithCalibratedWhite:0.557 alpha:1.0] setStroke];
+
+ [bp stroke];
}
- (void)mouseDown:(NSEvent *)event
More information about the commits
mailing list