Browse Source

Setup modern slider for floating window.

pull/101/head
Abhishek 3 years ago
parent
commit
3cbddcdd84
  1. 76
      Clocker/Panel/UI/FloatingWindow.xib
  2. 10
      Clocker/Panel/UI/HourMarkerViewItem.xib

76
Clocker/Panel/UI/FloatingWindow.xib

@ -3,6 +3,7 @@
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -15,11 +16,15 @@
<outlet property="leftButton" destination="7ID-ll-0YN" id="Msx-3N-nDQ"/>
<outlet property="leftField" destination="DHg-ca-UOi" id="eOW-Ml-DE8"/>
<outlet property="mainTableView" destination="3js-Fl-DdU" id="6Lu-oW-cuZ"/>
<outlet property="modernContainerView" destination="xiU-DQ-S8i" id="7FJ-Cn-9xz"/>
<outlet property="modernSlider" destination="DfM-T9-EJV" id="CDx-pv-9dR"/>
<outlet property="modernSliderLabel" destination="MkJ-lW-F34" id="KHL-tE-iEN"/>
<outlet property="nextEventLabel" destination="A9a-aM-BNn" id="d2X-dP-Xbi"/>
<outlet property="pinButton" destination="KWj-8n-2K0" id="FUW-0f-glB"/>
<outlet property="preferencesButton" destination="iFk-kj-d5a" id="1bK-Ld-MwV"/>
<outlet property="reviewView" destination="HBv-Eh-z9y" id="vt7-in-yQF"/>
<outlet property="rightButton" destination="8oB-ID-Dka" id="s0E-Pp-8Eb"/>
<outlet property="roundedDateView" destination="Ngk-LZ-J2y" id="AlZ-mg-9CJ"/>
<outlet property="scrollViewHeight" destination="SQM-7C-DIi" id="bRu-h6-Rvg"/>
<outlet property="sharingButton" destination="GMo-5B-bnh" id="ocx-7g-Wtp"/>
<outlet property="shutdownButton" destination="M9q-iF-MaE" id="43B-sx-8Oh"/>
@ -37,7 +42,7 @@
<windowCollectionBehavior key="collectionBehavior" moveToActiveSpace="YES" ignoresCycle="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="1000" y="379" width="350" height="460"/>
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1415"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1025"/>
<value key="minSize" type="size" width="150" height="50"/>
<value key="maxSize" type="size" width="350" height="800"/>
<view key="contentView" misplaced="YES" id="qEx-SC-5Qd">
@ -45,10 +50,10 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView focusRingType="none" distribution="fill" orientation="vertical" alignment="leading" spacing="0.0" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bn4-fy-Lm6">
<rect key="frame" x="0.0" y="0.0" width="379" height="460"/>
<rect key="frame" x="0.0" y="0.0" width="379" height="335"/>
<subviews>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="81" horizontalPageScroll="10" verticalLineScroll="81" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="khu-OS-PzP">
<rect key="frame" x="9" y="195" width="370" height="265"/>
<rect key="frame" x="9" y="70" width="370" height="265"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="2rS-3B-A3C">
<rect key="frame" x="0.0" y="0.0" width="370" height="265"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -254,7 +259,7 @@
</scroller>
</scrollView>
<customView identifier="Review Cell" translatesAutoresizingMaskIntoConstraints="NO" id="HBv-Eh-z9y">
<rect key="frame" x="0.0" y="145" width="379" height="50"/>
<rect key="frame" x="0.0" y="20" width="379" height="50"/>
<subviews>
<stackView distribution="fill" orientation="horizontal" alignment="centerY" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" fixedFrame="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Y83-Ew-CDw">
<rect key="frame" x="80" y="30" width="185" height="20"/>
@ -323,7 +328,7 @@
<accessibility description="Review Cell"/>
</customView>
<customView wantsLayer="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Z63-pM-8OA" customClass="ReviewView" customModule="Clocker" customModuleProvider="target">
<rect key="frame" x="0.0" y="70" width="379" height="75"/>
<rect key="frame" x="0.0" y="140" width="379" height="75"/>
<subviews>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="PpA-GH-1PV" customClass="ClockerTextBackgroundView" customModule="Clocker" customModuleProvider="target">
<rect key="frame" x="10" y="10" width="359" height="55"/>
@ -397,6 +402,62 @@
</constraints>
<accessibility identifier="UpcomingEventView"/>
</customView>
<customView wantsLayer="YES" focusRingType="none" id="xiU-DQ-S8i" userLabel="Modern Slider">
<rect key="frame" x="14" y="70" width="350" height="70"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<scrollView wantsLayer="YES" borderType="none" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasVerticalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uPi-Fy-jM2">
<rect key="frame" x="5" y="30" width="340" height="40"/>
<clipView key="contentView" id="k15-DH-gfX">
<rect key="frame" x="0.0" y="0.0" width="340" height="40"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView id="DfM-T9-EJV">
<rect key="frame" x="0.0" y="0.0" width="340" height="40"/>
<autoresizingMask key="autoresizingMask" heightSizable="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" id="Kqv-Gl-PyA">
<size key="itemSize" width="10" height="50"/>
</collectionViewFlowLayout>
<color key="primaryBackgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<connections>
<outlet property="dataSource" destination="-2" id="fpK-DZ-kuA"/>
</connections>
</collectionView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="oU5-xB-bV5">
<rect key="frame" x="0.0" y="34" width="340" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="sRi-SY-uKD">
<rect key="frame" x="-100" y="-100" width="16" height="50"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="MkJ-lW-F34">
<rect key="frame" x="123" y="3" width="104" height="22"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="LUK-pw-M3N"/>
</constraints>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label Goes Here" id="7Aa-eD-d0u">
<font key="font" size="10" name="Avenir-LightOblique"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="Accent Color"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="MkJ-lW-F34" firstAttribute="top" secondItem="uPi-Fy-jM2" secondAttribute="bottom" constant="5" id="1uz-6J-S4w"/>
<constraint firstItem="MkJ-lW-F34" firstAttribute="centerX" secondItem="xiU-DQ-S8i" secondAttribute="centerX" id="MW5-Qe-cfE"/>
<constraint firstAttribute="bottom" secondItem="uPi-Fy-jM2" secondAttribute="bottom" constant="30" id="Soz-Zw-M6w"/>
<constraint firstAttribute="height" constant="70" id="eCl-cg-UDO"/>
<constraint firstAttribute="trailing" secondItem="uPi-Fy-jM2" secondAttribute="trailing" constant="5" id="jce-zY-iUW"/>
<constraint firstAttribute="bottom" secondItem="MkJ-lW-F34" secondAttribute="bottom" constant="3" id="nQn-wx-QRA"/>
<constraint firstItem="uPi-Fy-jM2" firstAttribute="leading" secondItem="xiU-DQ-S8i" secondAttribute="leading" constant="5" id="tm8-dw-m3t"/>
<constraint firstItem="uPi-Fy-jM2" firstAttribute="top" secondItem="xiU-DQ-S8i" secondAttribute="top" id="zwN-Wp-qel"/>
</constraints>
<accessibility identifier="Modern Slider"/>
</customView>
<customView wantsLayer="YES" focusRingType="none" translatesAutoresizingMaskIntoConstraints="NO" id="6vv-g2-Z63" userLabel="Slider View">
<rect key="frame" x="0.0" y="40" width="350" height="30"/>
<subviews>
@ -529,6 +590,7 @@
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
<integer value="1000"/>
</visibilityPriorities>
<customSpacing>
<real value="3.4028234663852886e+38"/>
@ -536,6 +598,7 @@
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
<real value="3.4028234663852886e+38"/>
</customSpacing>
</stackView>
</subviews>
@ -563,5 +626,8 @@
<image name="PowerIcon" width="350" height="350"/>
<image name="Remove" width="700" height="700"/>
<image name="Sunrise" width="700" height="700"/>
<namedColor name="Accent Color">
<color red="0.092000000178813934" green="0.0" blue="0.99900001287460327" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>

10
Clocker/Panel/UI/HourMarkerViewItem.xib

@ -16,20 +16,18 @@
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="Hz6-mo-xeY">
<rect key="frame" x="0.0" y="0.0" width="181" height="103"/>
<rect key="frame" x="0.0" y="0.0" width="11" height="103"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<box focusRingType="none" horizontalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="1AP-TS-SAk">
<rect key="frame" x="88" y="0.0" width="5" height="103"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="1" id="DvW-Pd-tOA"/>
</constraints>
<rect key="frame" x="3" y="0.0" width="5" height="103"/>
</box>
</subviews>
<constraints>
<constraint firstItem="1AP-TS-SAk" firstAttribute="centerX" secondItem="Hz6-mo-xeY" secondAttribute="centerX" id="Ki4-9N-cRe"/>
<constraint firstAttribute="bottom" secondItem="1AP-TS-SAk" secondAttribute="bottom" id="VbR-OQ-DUr"/>
<constraint firstItem="1AP-TS-SAk" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" constant="5" id="azF-Qf-1NL"/>
<constraint firstItem="1AP-TS-SAk" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" identifier="constrainFromTop" id="s8k-hS-sHN"/>
<constraint firstAttribute="trailing" secondItem="1AP-TS-SAk" secondAttribute="trailing" constant="5" id="zcN-at-PoJ"/>
</constraints>
<point key="canvasLocation" x="-17.5" y="283"/>
</customView>

Loading…
Cancel
Save