|
|
@ -7,10 +7,12 @@ import { |
|
|
|
Image, |
|
|
|
Image, |
|
|
|
useEventHandler |
|
|
|
useEventHandler |
|
|
|
} from "@nodegui/react-nodegui"; |
|
|
|
} from "@nodegui/react-nodegui"; |
|
|
|
|
|
|
|
import path from "path"; |
|
|
|
import React, { useState } from "react"; |
|
|
|
import React, { useState } from "react"; |
|
|
|
import { AspectRatioMode, QPushButtonEvents } from "@nodegui/nodegui"; |
|
|
|
import { AspectRatioMode, QPushButtonEvents } from "@nodegui/nodegui"; |
|
|
|
|
|
|
|
|
|
|
|
import imageUrl from "../assets/sample.jpg"; |
|
|
|
import imageUrl from "../assets/sample.jpg"; |
|
|
|
|
|
|
|
const distImgUrl = path.resolve(__dirname, imageUrl); |
|
|
|
|
|
|
|
|
|
|
|
const fixedSize = { width: 500, height: 500 }; |
|
|
|
const fixedSize = { width: 500, height: 500 }; |
|
|
|
const App = () => { |
|
|
|
const App = () => { |
|
|
@ -27,7 +29,7 @@ const App = () => { |
|
|
|
<Text id="result">{`Time in epoc: ${time.getTime()}`}</Text> |
|
|
|
<Text id="result">{`Time in epoc: ${time.getTime()}`}</Text> |
|
|
|
<Image |
|
|
|
<Image |
|
|
|
style={imageStyle} |
|
|
|
style={imageStyle} |
|
|
|
src={imageUrl} |
|
|
|
src={distImgUrl} |
|
|
|
aspectRatioMode={AspectRatioMode.KeepAspectRatio} |
|
|
|
aspectRatioMode={AspectRatioMode.KeepAspectRatio} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|