Skip to content
Permalink
Browse files

Adapt more Button Bars for Dark Mode

* Content Filter Manager
* Database Process List
* Export Sheet
* Add Index Sheet
* Prefs - Manage Themes Sheet
* DBView
  • Loading branch information...
dmoagx committed Jul 19, 2018
1 parent 28b1a86 commit 27ba34f47bc7fb472467d14b59094143d6752332
@@ -51,11 +51,10 @@
<rect key="frame" x="0.0" y="0.0" width="213" height="361"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView id="380">
<customView id="yka-k0-BGx" customClass="SPButtonBar">
<rect key="frame" x="0.0" y="0.0" width="213" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="button_bar_spacer" id="381"/>
</imageView>
</customView>
<imageView id="382">
<rect key="frame" x="198" y="0.0" width="15" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
@@ -314,8 +313,6 @@ Gw
<size key="minSize" width="244" height="82"/>
<size key="maxSize" width="592" height="10000000"/>
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<size key="minSize" width="244" height="82"/>
<size key="maxSize" width="592" height="10000000"/>
<connections>
<binding destination="143" name="font" keyPath="values.CustomQueryEditorFont" id="306">
<dictionary key="options">
@@ -415,7 +412,6 @@ Gw
<image name="button_action" width="16" height="16"/>
<image name="button_add" width="16" height="16"/>
<image name="button_bar_handle" width="16" height="16"/>
<image name="button_bar_spacer" width="10" height="29"/>
<image name="button_remove" width="32" height="23"/>
</resources>
</document>

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -198,11 +198,10 @@
<rect key="frame" x="619" y="178" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
</progressIndicator>
<imageView misplaced="YES" id="74">
<customView id="pmB-gQ-pby" customClass="SPButtonBar">
<rect key="frame" x="0.0" y="0.0" width="640" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="axesIndependently" image="button_bar_spacer" id="86"/>
</imageView>
</customView>
<button verticalHuggingPriority="750" id="87">
<rect key="frame" x="452" y="2" width="168" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
@@ -390,7 +389,7 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" tag="1" id="135">
<rect key="frame" x="134.00000087703972" y="13" width="80" height="28"/>
<rect key="frame" x="134" y="13" width="80" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="OK" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" tag="1" inset="2" id="172">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -404,7 +403,7 @@ DQ
</connections>
</button>
<button verticalHuggingPriority="750" id="140">
<rect key="frame" x="50.000003151203373" y="13" width="86" height="28"/>
<rect key="frame" x="50" y="13" width="86" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Cancel" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="141">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -438,7 +437,6 @@ Gw
</objects>
<resources>
<image name="button_action" width="30" height="22"/>
<image name="button_bar_spacer" width="11" height="23"/>
<image name="button_refresh" width="30" height="22"/>
</resources>
</document>
@@ -323,8 +323,6 @@ Gw
<size key="minSize" width="363" height="178"/>
<size key="maxSize" width="717" height="10000000"/>
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="363" height="178"/>
<size key="maxSize" width="717" height="10000000"/>
</textView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
@@ -1054,17 +1052,16 @@ Gw
</connections>
</popUpButton>
<box autoresizesSubviews="NO" title="Box" boxType="custom" borderType="line" id="1408">
<rect key="frame" x="21" y="20" width="414" height="23"/>
<rect key="frame" x="21" y="19" width="414" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="412" height="21"/>
<view key="contentView" id="IX4-NU-oQu">
<rect key="frame" x="1" y="1" width="412" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView id="1399">
<rect key="frame" x="0.0" y="0.0" width="413" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="button_bar_spacer" id="1400"/>
</imageView>
<customView id="veN-mv-ORW" customClass="SPButtonBar">
<rect key="frame" x="0.0" y="0.0" width="412" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</customView>
<button toolTip="Refresh table list" id="1404">
<rect key="frame" x="-1" y="-1" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
@@ -1077,7 +1074,7 @@ Gw
</connections>
</button>
<button toolTip="Mark all tables" tag="1" id="1410">
<rect key="frame" x="381" y="-2" width="32" height="25"/>
<rect key="frame" x="381" y="-1" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="button_select_all" imagePosition="overlaps" alignment="center" inset="2" id="1411">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -1088,7 +1085,7 @@ Gw
</connections>
</button>
<button toolTip="Unmark all tables" id="1414">
<rect key="frame" x="350" y="-2" width="32" height="25"/>
<rect key="frame" x="350" y="-1" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="button_select_none" imagePosition="overlaps" alignment="center" inset="2" id="1415">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -1132,7 +1129,6 @@ Gw
</objects>
<resources>
<image name="NSApplicationIcon" width="128" height="128"/>
<image name="button_bar_spacer" width="10" height="23"/>
<image name="button_refresh" width="30" height="22"/>
<image name="button_select_all" width="30" height="22"/>
<image name="button_select_none" width="30" height="22"/>
@@ -275,19 +275,18 @@ Gw
</connections>
</button>
<box autoresizesSubviews="NO" title="Box" boxType="custom" borderType="line" id="140">
<rect key="frame" x="-1" y="75" width="336" height="23"/>
<rect key="frame" x="-1" y="74" width="332" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="334" height="21"/>
<view key="contentView" id="bO7-Je-F0l">
<rect key="frame" x="1" y="1" width="330" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView id="141">
<rect key="frame" x="-2" y="0.0" width="333" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="button_bar_spacer" id="142"/>
</imageView>
<customView id="DDC-T5-PcI" customClass="SPButtonBar">
<rect key="frame" x="0.0" y="0.0" width="330" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</customView>
<button toolTip="Remove indexed field" id="143">
<rect key="frame" x="30" y="-1" width="32" height="25"/>
<rect key="frame" x="30" y="0.0" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="button_remove" imagePosition="only" alignment="center" inset="2" id="146">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -298,7 +297,7 @@ Gw
</connections>
</button>
<button toolTip="Add indexed field" id="144">
<rect key="frame" x="-1" y="-1" width="32" height="25"/>
<rect key="frame" x="-1" y="0.0" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="button_add" imagePosition="overlaps" alignment="center" inset="2" id="145">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -332,7 +331,6 @@ Gw
</objects>
<resources>
<image name="button_add" width="16" height="16"/>
<image name="button_bar_spacer" width="10" height="29"/>
<image name="button_remove" width="32" height="23"/>
</resources>
</document>
@@ -182,7 +182,7 @@ Gw
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" id="1759">
<rect key="frame" x="161.00000039736432" y="13" width="88" height="28"/>
<rect key="frame" x="161" y="13" width="88" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES"/>
<buttonCell key="cell" type="push" title="Close" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" inset="2" id="1764">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -245,17 +245,16 @@ Gw
</connections>
</scrollView>
<box autoresizesSubviews="NO" title="Box" boxType="custom" borderType="line" id="2252">
<rect key="frame" x="-1" y="57" width="266" height="23"/>
<rect key="frame" x="-1" y="56" width="266" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<view key="contentView">
<rect key="frame" x="1" y="1" width="264" height="21"/>
<view key="contentView" id="sIK-yy-s99">
<rect key="frame" x="1" y="1" width="264" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView id="2254">
<rect key="frame" x="-2" y="0.0" width="272" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="button_bar_spacer" id="2257"/>
</imageView>
<customView id="GNX-ny-MYp" customClass="SPButtonBar">
<rect key="frame" x="0.0" y="0.0" width="264" height="23"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</customView>
<button toolTip="Remove Theme" id="2255">
<rect key="frame" x="31" y="-1" width="32" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
@@ -1728,7 +1727,6 @@ Warning: If Sequel Pro and the server do not have at least one cipher suite in c
</objects>
<resources>
<image name="NSAdvanced" width="32" height="32"/>
<image name="button_bar_spacer" width="10" height="29"/>
<image name="button_duplicate" width="33" height="23"/>
<image name="button_remove" width="32" height="23"/>
<image name="resetTemplate" width="16" height="16"/>
@@ -96,13 +96,11 @@ - (BOOL)isInDarkMode

- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];

NSImage *img = ([self isInDarkMode] ? darkImage : lightImage);
NSRect drawFrame = [self frame];
NSRect drawFrame = [self bounds];
drawFrame.origin.x = dirtyRect.origin.x;
drawFrame.size.width = dirtyRect.size.width;
[img drawInRect:drawFrame fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];
[img drawInRect:drawFrame fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}

@end

0 comments on commit 27ba34f

Please sign in to comment.
You can’t perform that action at this time.